Document Type Definition; Api - 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

Document Type Definition

Advantages of Using the Junos XML Management Protocol and Junos XML API
Copyright © 2010, Juniper Networks, Inc.
Chapter 1: Introduction to the Junos XML Management Protocol and Junos XML API
As the preceding examples show, angle brackets enclose the name of a Junos XML or
Junos XML protocol tag element in its opening and closing tags. This is an XML convention,
and the brackets are a required part of the complete tag element name. They are not to
be confused with the angle brackets used in Juniper Networks documentation to indicate
optional parts of CLI command strings.
Junos XML and Junos XML protocol tag elements obey the XML convention that the tag
element name indicates the kind of information enclosed by the tags. For example, the
name of the Junos XML
<interface-state>
description of the current status of an interface on the device, whereas the name of the
tag element indicates that its contents specify the number of bytes received.
<input-bytes>
When discussing tag elements in text, this documentation conventionally uses just the
name of the opening tag to represent the complete tag element (opening tag, contents,
and closing tag). For example, the documentation refers to the
indicate the entire
<input-bytes>number-of-bytes</input-bytes>
An XML-tagged document or data set is structured, because a set of rules specifies the
ordering and interrelationships of the items in it. The rules define the contexts in which
each tagged item can—and in some cases must—occur. A file called a document type
definition, or DTD, lists every tag element that can appear in the document or data set,
defines the parent-child relationships between the tags, and specifies other tag
characteristics. The same DTD can apply to many XML documents or data sets.
The Junos XML management protocol and Junos XML API fully document all options for
every supported Junos operational request and all elements in every Junos configuration
statement. The tag names clearly indicate the function of an element in an operational
request or configuration statement.
The combination of meaningful tag names and the structural rules in a DTD makes it
easy to understand the content and structure of an XML-tagged data set or document.
Junos XML and Junos XML protocol tag elements make it straightforward for client
applications that request information from a device to parse the output and find specific
information.
The following example illustrates how the Junos XML API makes it easier to parse device
output and extract the needed information. It compares formatted ASCII and XML-tagged
versions of output from a device running the Junos OS. The formatted ASCII follows:
Physical interface: fxp0, Enabled, Physical link is Up
Interface index: 4, SNMP ifIndex: 3
The corresponding XML-tagged version is:
<interface>
<name>fxp0</name>
<admin-status>enabled</admin-status>
<operational-status>up</operational-status>
<index>4</index>
tag element indicates that it contains a
<input-bytes>
tag element.
tag to
5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents