LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xml-list

List element structure of an XML document

TLDR

List all elements in the document
$ xml el [file.xml]
copy
Show elements with attributes
$ xml el -a [file.xml]
copy
Show elements with attributes and values
$ xml el -v [file.xml]
copy
Show unique element paths
$ xml el -u [file.xml]
copy

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
copy
sudo pacman -S xmlstarlet
copy
sudo apk add xmlstarlet
copy
sudo zypper install xmlstarlet
copy
brew install xmlstarlet
copy
nix profile install nixpkgs#xmlstarlet
copy

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid