Child Tag Elements Of A Response Tag Element; Spaces, Newline Characters, And Other White Space; Using Junos Xml Management Protocol And Junos Xml Tag Elements - Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Child Tag Elements of a Response Tag Element

Spaces, Newline Characters, and Other White Space

Copyright © 2010, Juniper Networks, Inc.
Chapter 2: Using Junos XML Management Protocol and Junos XML Tag Elements
object). For operational requests, each child tag element represents one of the options
you provide on the command line when issuing the equivalent CLI command.
Some requests have mandatory child tag elements. To make a request successfully, a
client application must emit the mandatory tag elements within the request tag element's
opening and closing tags. If any of the children are themselves container tag elements,
the opening tag for each must occur before any of the tag elements it contains, and the
closing tag must occur before the opening tag for another tag element at its hierarchy
level.
In most cases, the client application can emit children that occur at the same level within
a container tag element in any order. The important exception is a configuration element
that has an identifier tag element, which distinguishes the configuration element from
other elements of its type. The identifier tag element must be the first child tag element
in the container tag element. Most frequently, the identifier tag element specifies the
name of the configuration element and is called
The child tag elements of a response tag element represent the individual data items
returned by the Junos XML protocol server for a particular request. The children can be
either individual tag elements (empty tags or tag element triples) or container tag
elements that enclose their own child tag elements. For some container tag elements,
the Junos XML protocol server returns the children in alphabetical order. For
other elements, the children appear in the order in which they were created in
the configuration.
The set of child tag elements that can occur in a response or within a container tag
element is subject to change in later releases of the Junos XML API. Client applications
must not rely on the presence or absence of a particular tag element in the Junos XML
protocol server's output, nor on the ordering of child tag elements within a response tag
element. For the most robust operation, include logic in the client application that handles
the absence of expected tag elements or the presence of unexpected ones as gracefully
as possible.
As dictated by the XML specification, the Junos XML protocol server ignores white space
(spaces, tabs, newline characters, and other characters that represent white space) that
occurs between tag elements in the tag stream generated by a client application. Client
applications can, but do not need to, include white space between tag elements. However,
they must not insert white space within an opening or closing tag. If they include white
space in the contents of a tag element that they are submitting as a change to the
candidate configuration, the Junos XML protocol server preserves the white space in the
configuration database.
In its responses, the Junos XML protocol server includes white space between tag elements
to enhance the readability of responses that are saved to a file: it uses newline characters
to put each tag element on its own line, and spaces to indent child tag elements to the
right compared to their parents. A client application can ignore or discard the white space,
particularly if it does not store responses for later review by human users. However, it
<name>
.
11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents