Oct 29 2012

XML pretty print on MacOSX

When you spent half of your day integrating with external systems, you’ll get into a point where reading a xml message is an extremely tiring event.

By making the xml message with the right indentation your life will become 100x easy.

Just copy the xml message into your computer memory, and then run this command.

pbpaste | xmllint --format - > pretty-xml.xml

You’ll get a pretty and nice readable xml file on your destination file “pretty-xml.xml”.

2 comments on “XML pretty print on MacOSX

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>