Network XML filters
To convert the XML output of a network device command into structured JSON
output, use theansible.netcommon.parse_xmlfilter:
Theansible.netcommon.parse_xmlfilter will load the spec file and pass the command output
through formatted as JSON.
The spec file should be valid formatted YAML. It defines how to parse the XML
output and return JSON data.
Below is an example of a valid spec file that
will parse the output from theshowvlan|displayxmlcommand.
The spec file above will return a JSON data structure that is a list of hashes
with the parsed VLAN information.
The same command could be parsed into a hash by using the key and values
directives.  Here is an example of how to parse the output into a hash
value using the sameshowvlan|displayxmlcommand.