Featured Post

My favorite links (ranked)

#1  Linux laptop powertuning painlessly (almost) #2 hard-drive-recovery #3 Chromebook Specifications #4 Internet BMW riders   #5 Findagra...

Monday, January 7, 2019

Beautify already correct xml content with easy vi/vim spell...

Need to edit out nodes from massive computer generated xml files that don't feature formatting for human eyes in the interest of preventing early onset blindness? Use this handy vi trick (requires xmllint be installed)...

:%!xmllint --format %

presto human friendly formatting for monolithic xml files with no indenting or newlines etc.

Before....

and voila....

If this throws an error on ubuntu (indicating not installed), install libxml2-utils and all will be well.

No comments:

Post a Comment

Comments welcome!