In JunOS you can export any output in XML. For example you can try:
show route protocol bgp | display xml
This will show you all the BGP routing table but in XML format. Which will look like:
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.3R4/junos"> <route-information xmlns="http://xml.juniper.net/junos/12.3R4/junos-routing"> <!-- keepalive --> <route-table> <table-name>inet.0</table-name> <destination-count>547112</destination-count> <total-route-count>547137</total-route-count> <active-route-count>547112</active-route-count> <holddown-route-count>0</holddown-route-count> <hidden-route-count>1</hidden-route-count> <rt junos:style="brief"> <rt-destination>0.0.0.0/0</rt-destination> <rt-entry> <active-tag> </active-tag> <protocol-name>BGP</protocol-name> <preference>170</preference> <age junos:seconds="106012">1d 05:26:52</age> <local-preference>100</local-preference> <as-path>10102 9498 I </as-path> <validation-state>unknown</validation-state> <nh> <selected-next-hop/> <to>103.4.109.169</to> <via>ge-1/0/0.0</via> </nh> </rt-entry> </rt>