xml: draft all but 3 most complex subcommands

This commit is contained in:
Daniel Birket
2021-08-15 14:38:24 -04:00
committed by Starbeamrainbowlabs
parent cbd7a0e7cd
commit 786342aeef
13 changed files with 151 additions and 15 deletions

View File

@@ -1,8 +1,28 @@
# xml-elements
> XMLStarlet toolkit: Diaplay element structure of an XML document.
> Extract elements and structure of an XML document.
> More information: <http://xmlstar.sourceforge.net/docs.php>.
- Extract elements of an XML document (as XPATH expressions):
`xml elements {{path/to/input.xml|URI}} >{{path/to/elements}}`
- Extract elements and attributes of an XML document:
`xml elements -a {{path/to/input.xml|URI}} >{{path/to/elements}}`
- Extract elements, attributes, and their values:
`xml elements -v {{path/to/input.xml|URI}} >{{path/to/elements}}`
- Print sorted unique elements of an XML document (to see structure):
`xml elements -u {{path/to/input.xml|URI}}`
- Print sorted unique elements up to a depth of 3:
`xml elements -d{{3}} {{path/to/input.xml|URI}}`
- Display help for `elements` subcommand:
`xml elements --help`