Specifications

4-56
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-02
Chapter 4 Cisco CRS-1 Series XML and Native Data Operations
Native Data Operation Content
Null Value Representations
The standard attribute xsi:nil is used with a value of true when a null value is specified for an
element in an XML request or response document.
The following example shows how to specify a null value for the element <HoldTime>:
<Neighbor>
<Timers>
<KeepAlive>60</KeepAlive>
<HoldTime xsi:nil=”true”/>
</Timers>
</Neighbor>
Any element that can be set to nil in an XML instance has the attribute nillable set to true in the
XML schema definition for that element. For example:
<xsd:element name=”HoldTime” type=”xsd:unsignedInt” nillable=”true”/>
Any XML instance document that uses the nil mechanism must declare the XML Schema for Instance
Documents namespace, which contains the xsi:nil definition. Responses to native data operations
returned from the Cisco CRS-1 Series router declares the namespace in the operation tag. For example:
<Get xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
Operation Triggering
When structuring an XML request, the user should remember the following general rule regarding what
to specify in the XML for an operation to take place: As a client XML request is parsed by the
Cisco CRS-1 Series router, the specified operation takes place whenever a closing tag is encountered
after a series of one or more opening tags (but only when the closing tag is not the </Naming> tag).
The following example shows a request to get the BGP timer values for a particular BGP autonomous
system. In this example, the <Get> operation is triggered when the <GlobalTimers/> tag is encountered.
Sample XML Client Request to Trigger a <Get> Operation for BGP Timer Values
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Get>
<Configuration>
<BGP MajorVersion=”1” MinorVersion=”0”>
<AS>
<Naming>
<AS>3</AS>
</Naming>
<Global>
<GlobalTimers/>
</Global>
</AS>
</BGP>
</Configuration>
</Get>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Get>
<Configuration>