1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00
tldr/pages/common/xml-elements.md
Daniel Birket 82f626c693 xml: changes requested by marchersimon,
which undo the "the" changes previously made for sbrl.
The `select`, `edit`, and `transform` subcommands are not yet ready.
2021-08-24 21:50:43 +01:00

863 B

xml elements

Extract elements and display structure of an XML document. More information: http://xmlstar.sourceforge.net/docs.php.

  • Extract elements from an XML document (producing XPATH expressions):

xml elements {{path/to/input.xml|URI}} > {{path/to/elements}}

  • Extract elements and their attributes from an XML document:

xml elements -a {{path/to/input.xml|URI}} > {{path/to/elements}}

  • Extract elements and their attributes and values from an XML document:

xml elements -v {{path/to/input.xml|URI}} > {{path/to/elements}}

  • Print sorted unique elements from an XML document to see its structure:

xml elements -u {{path/to/input.xml|URI}}

  • Print sorted unique elements from an XML document up to a depth of 3:

xml elements -d{{3}} {{path/to/input.xml|URI}}

  • Display help for the elements subcommand:

xml elements --help