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 :
$ 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!