To display the output from a CLI command as NETCONF and JUNOS XML tag elements instead of as the default formatted ASCII, pipe the command to the display xml command. Infrastructure tag elements in the response belong to the JUNOScript API instead of the NETCONF API. The tag elements that describe JUNOS configuration or operational data belong to the JUNOS XML API, which defines the JUNOS content that can be retrieved and manipulated by both the JUNOScript and NETCONF APIs.
The following example shows the output from the show chassis hardware command issued on an M20 Internet router that is running the initial version of JUNOS Release 9.4 (the opening <chassis-inventory> tag appears on two lines for legibility only):
- user@host> show chassis hardware | display
xml
<rpc-reply xmlns:junos=”http://xml.juniper.net/junos/9.4R1/junos”>
<chassis-inventory \
xmlns="http://xml.juniper.net/junos/9.4R1/junos-chassis">
<chassis junos:style="inventory">
<name>Chassis</name>
<serial-number>00118</serial-number>
<description>M20</description>
<chassis-module>
<name>Backplane</name>
<version>REV 06</version>
<part-number>710-001517</part-number>
<serial-number>AB5911</serial-number>
</chassis-module>
<chassis-module>
<name>Power Supply A</name>
<!- - other child tags of <chassis-module> - ->
</chassis-module>
<!- - other child tags of <chassis> - ->
</chassis>
</chassis-inventory>
</rpc-reply>
]]>]]>