The xmlutils app contains a pretty printer command.
I have built a prototype of an XML pretty printing module.
You can get the bits from GitHub
It includes a sample view on internal data, and right now only works on an explicit field name of xml
above link doesn't work , kindly help me to print my xml in pretty print format