Creating XML Code
Creating XML Code
Cisco Content Services Switch Administration Guide
7-2
When developing XML code for the Content API to issue CLI commands, adhere
to the following guidelines. You can use any text editor for creating the XML
code. The maximum number of characters for each tag set is 300.
Include the following line as the first line in the XML file:
1.
<?xml version="1.0" standalone="yes"?>
Enclose the CLI commands within the <action></action> tag set. For
2.
example:
<action>add service MyServiceName</action>
<action>vip address 10.2.3.4</action>
A nested script play command (to execute a script line by line from
Note
the CLI) is not allowed in an XML file. This restriction is enforced
because the actual execution of the XML tag set is performed within
a script play command
If special characters are required in an XML configuration, be aware of the
3.
following considerations:
The CSS supports the inclusion of the ~, !, @, #, $, ^, &, *, (, and
–
) characters in XML content. All other special characters (such as <, >,
and %) are not supported in an XML configuration.
Special characters can be included in a service, owner, or content name
–
provided that the name is included in the content of the XML element and
the name is enclosed within an <action></action> tag set. For example,
<action>service My@#Service</action>
If special characters do form part of an XML tag, specifically an
–
attribute, these characters are not supported (for example,
= My@#Service>
special characters may be discarded. You must enclose the special
characters within an <action></action> tag set, as described above.
Chapter 7
Using an XML Document to Configure the CSS
. In this case, the command request may be rejected or the
.
<service name
OL-5647-02