xml format

Format an XML document. More information: http://xmlstar.sourceforge.net/docs.php.

xml format --indent-tab path/to/input.xml|URI > path/to/output.xml

xml format --html --indent-spaces 4 path/to/input.html|URI > path/to/output.html

xml format --recover --noindent path/to/malformed.xml|URI > path/to/recovered.xml

cat path\to\input.xml | xml format --dropdtd > path/to/output.xml

xml format --omit-decl path\to\input.xml|URI > path/to/output.xml

xml format --help