Options (8)
booleanFormat an XML document, indenting with tabs
Example:
xml {{[fo|format]}} {{[-t|--indent-tab]}} {{path/to/input.xml|URI}} > {{path/to/output.xml}}-t, --indent-tabbooleanFormat an XML document, indenting with tabs
Example:
xml {{[fo|format]}} {{[-t|--indent-tab]}} {{path/to/input.xml|URI}} > {{path/to/output.xml}}-H, --htmlbooleanFormat an HTML document, indenting with 4 spaces
Example:
xml {{[fo|format]}} {{[-H|--html]}} {{[-s|--indent-spaces]}} {{4}} {{path/to/input.html|URI}} > {{path/to/output.html}}-s, --indent-spacesbooleanFormat an HTML document, indenting with 4 spaces
Example:
xml {{[fo|format]}} {{[-H|--html]}} {{[-s|--indent-spaces]}} {{4}} {{path/to/input.html|URI}} > {{path/to/output.html}}-R, --recoverbooleanRecover parsable parts of a malformed XML document, without indenting
Example:
xml {{[fo|format]}} {{[-R|--recover]}} {{[-n|--noindent]}} {{path/to/malformed.xml|URI}} > {{path/to/recovered.xml}}-n, --noindentbooleanRecover parsable parts of a malformed XML document, without indenting
Example:
xml {{[fo|format]}} {{[-R|--recover]}} {{[-n|--noindent]}} {{path/to/malformed.xml|URI}} > {{path/to/recovered.xml}}-D, --dropdtdbooleanFormat an XML document from `stdin`, removing the `DOCTYPE` declaration
Example:
cat {{path/to/input.xml}} | xml {{[fo|format]}} {{[-D|--dropdtd]}} > {{path/to/output.xml}}-o, --omit-declbooleanFormat an XML document, omitting the XML declaration
Example:
xml {{[fo|format]}} {{[-o|--omit-decl]}} {{path/to/input.xml|URI}} > {{path/to/output.xml}}Examples (6)
Format an XML document, indenting with tabs
xml [fo|format] [-t|--indent-tab] path/to/input.xml|URI > path/to/output.xmlFormat an HTML document, indenting with 4 spaces
xml [fo|format] [-H|--html] [-s|--indent-spaces] 4 path/to/input.html|URI > path/to/output.htmlRecover parsable parts of a malformed XML document, without indenting
xml [fo|format] [-R|--recover] [-n|--noindent] path/to/malformed.xml|URI > path/to/recovered.xmlFormat an XML document from `stdin`, removing the `DOCTYPE` declaration
Format an XML document, omitting the XML declaration
xml [fo|format] [-o|--omit-decl] path/to/input.xml|URI > path/to/output.xmlDisplay help
xml [fo|format] --helpmade by @shridhargupta | data from tldr-pages