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

Parsing the NETCONF Server Response

The NETCONF server encloses its response to each client request in a separate pair of opening <rpc-reply> and closing </rpc-reply> tags, each of which constitutes a well-formed XML document. In the opening <rpc-reply> tag, it includes the xmlns and xmlns:junos attributes (the opening tag appears here on multiple lines for legibility only):

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" \
                xmlns:junos="http://xml.juniper.net/junos/release/junos" \
                [echoed attributes]>
    <!- - tag elements representing a response - ->
</rpc-reply>
]]>]]>

The xmlns attribute defines the namespace for enclosed tag elements that do not have the junos: prefix on their names and that are not enclosed in a child container tag that has the xmlns attribute with a different value.

The xmlns:junos attribute defines the namespace for enclosed tag elements that have the junos: prefix on their names. The variable release is replaced by a code such as 9.3R1 for the initial version of JUNOS Release 9.3.

For information about the ]]>]]> character sequence, see Generating Well-Formed XML Documents. For information about echoed attributes, see Including Attributes in the Opening <rpc> Tag.

Client applications must include code for parsing the stream of response tag elements coming from the NETCONF server, either processing them as they arrive or storing them until the response is complete. See the following sections for further information:


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