I know of two ways to "pretty print", or format, xml:
what other free (as in beer) formatters are there? (aside from using javascript)
Well, the identity transform you linked to is portable to any XSLT processor (Saxon, msxml, etc).
Additionally, you could look at xmllint
which is part of the LibXML2 toolkit. The --format
option allows you to pretty print the input. Similar functionality exists in XMLStarlet (which uses LibXML2 under the hood iirc).