very simple way to pretty print xml from command line
I was looking for a tool to format xml, making it more readeable, under Linux you can use xmllint. It's included in libxml2 and thererfore should be availlaible in any distribution. The use is very simple :
It will pretty print to the console to have in a file just redirect the default output to a file.
And that's it!
$ xmllint --format myXmlFile.xml
It will pretty print to the console to have in a file just redirect the default output to a file.
$ xmllint --format myXmlFile.xml > myPrettyPrintedFile.xml
And that's it!