Re:Pretty-printing JSON and XML on Mac OSX
by _djo_ on Sunday November 13, 2011 @03:45PM
(#3231786)
Just be aware that xmllint cleans up XML as well as formatting it, which can in rare circumstances cause some confusion.
So if the incoming XML had an empty tag specified as <tag></tag> xmllint will turn it into <tag/>. If you're specifically looking for <tag></tag> for some reason, then that could trip you up.
So if the incoming XML had an empty tag specified as <tag></tag> xmllint will turn it into <tag/>. If you're specifically looking for <tag></tag> for some reason, then that could trip you up.
Shouldn't matter 99% of the time though.