xml-format
Pretty-print XML documents
TLDR
Format XML file
$ xml format [input.xml]
Format with indentation$ xml format --indent-spaces [4] [input.xml]
Format to output file$ xml format [input.xml] > [output.xml]
SYNOPSIS
xml format [options] [file]
DESCRIPTION
xml format pretty-prints XML documents. Part of xmlstarlet toolkit. Reformats XML with proper indentation and line breaks for readability.
PARAMETERS
--indent string
Indentation string.--indent-spaces n
Indent with n spaces.--indent-tab
Indent with tabs.--omit-decl
Omit XML declaration.--dropdtd
Remove DTD.--recover
Try to recover malformed XML.
SEE ALSO
xml-validate(1), xml-select(1), xmllint(1)
