5-77
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-01
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques
Available Set of Native Data Access Techniques
.
data returned for 2nd neighbor
here
.
.
.
</Neighbor>
.
.
.
data returned for remaining
neighbors here
.
.
.
</NeighborTable>
</BGPEntity>
</AS>
</BGP>
</Configuration>
</Get>
</Response>
Custom Filtering (Filter Element)
Some of the tables from the operational namespace support the selection of rows of interest based on
predefined filtering criteria. Filters can be applied to such tables in order to reduce the number of table
entries retrieved in a request.
Client applications specify filtering criteria for such tables by using the <Filter> tag and including the
filter specific parameters as defined in the XML schema definition for that table. If no table entries match
the specified filter criteria, the response will contain the object class hierarchy down to the specified
table, but without any table entries being included. The Content attribute can be used with a filter to
specify the scope of a <Get> request.
In the following example, the filter <BGP_ASFilter> is used to retrieve operational information for all
neighbors in autonomous system 6:
Sample XML Client Request Using Filtering
<?xml version=”1.0” encoding=”UTF-8”?>
<Request MajorVersion="1" MinorVersion="0">
<Get>
<Operational>
<BGP MajorVersion=”1” MinorVersion=”0”>
<NeighborTable>
<Filter>
<BGP_ASFilter>
<AS>6</AS>
</BGP_ASFilter>
<Filter>
</NeighborTable>
</BGP>
</Operational>
</Get>
</Request>
Sample Filtered XML Response from the Cisco CRS-1 Series Router
<?xml version=”1.0” encoding=”UTF-8”?>
<Response MajorVersion="1" MinorVersion="0">