Pretty-printing XML with Emacs' NXML-mode
Did you ever get a stream of XML out of a log file, or in a data stream, and it's all mashed together without line-breaks so that it just appears as gobble-de-gook? If there's a data error (not an XML parsing error) then you have to read it so that you can find where the error is, but you don't have XML-spy and NetBeans is overkill or takes forever to fire up...
Emacs to the rescue! Benjamin Ferrari wrote this increadibly useful (and simple) elisp function to pretty-print a block of XML code: