Prettify XML in a shell
+1
−0
How to pretty print XML in a shell?
I have command-line tool which outputs XML in a single line, totally unreadable. I would like something to pipe this into, to turn it into human readable XML with newlines and indentation.
So something like this:
$ output-dirty-xml
<outer><inner some="value">Hey there!</inner></outer>
$ output-dirty-xml | prettify-xml
<outer>
<inner some="value">Hey there!</inner>
</outer>
1 comment thread