pretty printing xml

tidy is a nice CLI tool that can be used to pretty up some XML

I was interested in reviewing the raw format of CNN’s rss feed. tidy made it a lot easier to grok the structure of the XML:

curl 2>&1 | tidy -xml -iq
  • -xml — specify the input is well formed xml
  • -i — auto indent
  • -q — quiet: don’t display tool comments


Leave a Reply