Posted 2005-01-13T15:29:00+01:00 in unix recipe

Pretty formatting of XML documents

I had some XML documents that I wanted to edit manually which were generated with all text on one line. The xmllint utility from Gnome's libxml toolkit helps me out:

XMLLINT_INDENT='     ' xmllint --format ugly.xml > pretty.xml