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-format
> XMLStarlet toolkit: Format an XML document.
> Format an XML document.
> More information: <http://xmlstar.sourceforge.net/docs.php>.
- Format an XML document, indenting with tabs:
`xml format --indent-tab {{path/to/input.xml|URI}} >{{path/to/output.xml}}`
- Format an HTML document, indenting with 4 spaces:
`xml format --html --indent-spaces {{4}} {{path/to/input.html|URI}} >{{path/to/output.html}}`
- Recover parsable parts of a malformed XML document, without indenting:
`xml format --recover --noindent {{path/to/malformed.xml|URI}} >{{path/to/recovered.xml}}`
- Format an XML document from standard input, removing the DOCTYPE declaration:
`cat {{path\to\input.xml}} | xml format --dropdtd >{{path/to/output.xml}}`
- Format an XML document, omitting the XML declaration:
`xml format --omit-decl {{path\to\input.xml|URI}} >{{path/to/output.xml}}`
- Display help for `format` subcommand:
`xml format --help`