XML Programmatic Interface (XML-PI) was introduced in Cisco IOS
Release 12.4(22)T. XML-PI provides a programmable interface which encapsulates
IOS command-line interface (CLI) show commands in XML format in a consistent
way across different Cisco products. Customers using XML-PI will be able to
parse IOS show command output from within Tcl scripts using well-known keywords
instead of having to depend on the use of regular expression support to
"screen-scrape" output.
The benefit of using the XML-PI command extensions is to facilitate
the extraction of specific output information that is generated using a CLI
show command. Most show commands return many
fields within the output and currently a regular expression has to be used to
extract specific information that may appear in the middle of a line. XML-PI
support provides a set of Tcl library functions to facilitate the parsing of
output from the IOS CLI format extension in the form of:
show
<
show-command
> | format
{
spec-file
}
where a spec-file is a concatenation of all Spec File Entries (SFE)
for each
show command currently supported. As part of
the XML-PI project a default spec-file will be included in the IOS Release
12.4(22)T images. The default spec-file will have a small set of commands and
the SFE for the commands will have a subset of the possible tags. If no
spec-file is provided with the format command, the default spec-file is used.
For more general details about XML-PI, see the "XML-PI" module.