[Contents] [Prev] [Next] [Index] [Report an Error]

Requesting an XML Schema for the Configuration Hierarchy

To request an XML Schema-language representation of the entire configuration hierarchy, a client application emits the <get-xnm-information>, <type>, and <namespace> tag elements with the indicated values in an <rpc> tag element:

<rpc>
<get-xnm-information>
<type>xml-schema</type>
<namespace>junos-configuration</namespace>
</get-xnm-information>
</rpc>

The JUNOScript server encloses the XML schema in <rpc-reply> and <xsd:schema> tag elements:

<rpc-reply xmlns:junos="URL">
<xsd:schema>
<!- - tag elements for the JUNOS schema - ->
</xsd:schema>
</rpc-reply>

The schema represents all configuration elements available in the version of the JUNOS software that is running on the routing platform. (To determine the JUNOS version, emit the <get-software-information> operational request tag, which is documented in the JUNOS XML API Operational Reference.)

Client applications can use the schema to validate the configuration on a routing platform, or simply to learn which configuration statements are available in the version of the JUNOS software running on the routing platform. The schema does not indicate which elements are actually configured, or even that an element can be configured on that type of routing platform (some configuration statements are available only on certain routing platform types). To request the set of currently configured elements and their settings, emit the <get-configuration> tag element instead, as described in Requesting Configuration Information.

Explaining the structure and notational conventions of the XML Schema language is beyond the scope of this document. For information, see XML Schema Part 0: Primer, available from W3C at http://www.w3.org/TR/xmlschema-0. It provides a basic introduction and lists the formal specifications where you can find detailed information.

For further information, see the following sections:


[Contents] [Prev] [Next] [Index] [Report an Error]