ON THIS PAGE
junos:data-xpath
Usage
<rpc-reply>
<operational-response-tag junos:data-xpath="path">
<element junos:data-xpath="path">
<first-child-of-element junos:data-xpath="path">
<second-child-of-element junos:data-xpath="path">
<!-- additional children of element -->
</element>
</operational-response-tag>
</rpc-reply>Description
Define the XPath expression that selects that specific node in the operational response.
Many client applications use XPath to parse or reference nodes in Junos XML data.
When a client application executes an operational RPC with the
format="xml-xpath" attribute, the server returns XML output
that includes the junos:data-xpath attribute for every tag. You can
use this attribute to quickly retrieve the correct XPath expression for a given
element.
Usage Example
The following example executes the
<get-commit-revision-information> RPC and requests the
xml-xpath format:
<rpc><get-commit-revision-information format="xml-xpath"/></rpc>
The xml-xpath format returns XML output that includes the XPath
expression for each node.
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/26.2R1.12-EVO/junos"> <commit-revision-information junos:data-xpath="/commit-revision-information"> <revision junos:data-xpath="/commit-revision-information/revision">re0-1778619027-1</revision> </commit-revision-information> </rpc-reply>
Release Information
junos:data-xpath attribute added in Junos OS Release 26.2R1 and
Junos OS Evolved Release 26.2R1.