This article describes a procedure for exporting a configuration from a device to an XML readable format.
Note: Although importing into Microsoft Excel can be done, the Junos OS XML was designed for NSM and Space, not Excel. There is no guarantee that all fields will be interpreted by the Excel import the way one might expect or desire, due to how the configuration structure works. Most notably are the permit and deny sections, as there is no value within those stanzas to appear within the Excel interpretation.
How can I export a policy configuration from an SRX device to an XML-compliant spreadsheet?
Here is the policy configuration on an SRX device:
set security policies from-zone trust to-zone untrust policy permit-t2u match source-address LAN_Zone set security policies from-zone trust to-zone untrust policy permit-t2u match destination-address any set security policies from-zone trust to-zone untrust policy permit-t2u match application any set security policies from-zone trust to-zone untrust policy permit-t2u then permit set security policies from-zone trust to-zone untrust policy deny-t2u match source-address any set security policies from-zone trust to-zone untrust policy deny-t2u match destination-address any set security policies from-zone trust to-zone untrust policy deny-t2u match application any set security policies from-zone trust to-zone untrust policy deny-t2u then deny
# show security policies | display xml | no-more
From the output of above command, select everything inside <security> tags (including these tags as well). Save the extracted output as an XML file and open it in an XML-compliant spreadsheet program.
Here is the snapshot from a spreadsheet program, after performing Steps 1 and 2 for the above configuration sample: