xml-list
List element structure of an XML document
TLDR
List all elements in the document
$ xml el [file.xml]
Show elements with attributes$ xml el -a [file.xml]
Show elements with attributes and values$ xml el -v [file.xml]
Show unique element paths$ xml el -u [file.xml]
SYNOPSIS
xml el [options] file
DESCRIPTION
xml el (also accepted as xml elements / xml list) prints the element structure of an XML document as XPath-like paths, one per line. It is part of the xmlstarlet toolkit.Useful for quickly exploring unfamiliar XML files, producing summaries of element hierarchies, or generating templates for xml sel queries.
PARAMETERS
FILE
XML input file (use - for stdin).-a
Show attributes of each element.-v
Show attributes and values.-u
Show only unique element paths.
INSTALL
sudo dnf install xmlstarlet
sudo pacman -S xmlstarlet
sudo apk add xmlstarlet
sudo zypper install xmlstarlet
brew install xmlstarlet
nix profile install nixpkgs#xmlstarlet
SEE ALSO
xml-elements(1), xml-select(1), xmlstarlet(1)