13 June 2012

XML indenting/formatting

Bambitroll @ 14:56

Working with XML can be a pain, but it is even more so if the XML you get it not properly formatted or indented.

Editors support this more or less properly.

This simple command line will give you something nice:
$ xmllint --format original.xml > nice.xml

P.S: make sure you run this in order to have xmllint installed
apt-get install libxml2-utils