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 http://rss.cnn.com/rss/cnn_latest.rss 2>&1 | tidy -xml -iq
  • -xml — specify the input is well formed xml
  • -i — auto indent
  • -q — quiet: don’t display tool comments

before
after

Leave a Reply