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.

Comments

Popular

About Me...

My dad called me Timbocephus from time to time when I was growing up. He was a Hank Williams fan at some point I believe.

    Of course everyone recognizes the "Timbo" nickname. But going deeper into mid 20th century popular culture we find that Hank famously stuck the "Bocephus" moniker on his young son Hank Jr. There are several suggested sources for the "Bocephus" name and you can find those on line very readily if you google it.

    Having said that, I like this one best: The mysterious appellation that became part of American folklore in middle of the 20th century: Biblical/Latin Etymology: Some trace it back to a neoclassical blend of Beau (French for beautiful) and Cephas (the Aramaic name given to the Apostle Peter, meaning "stone"). [1]  (https://gardenandgun.com/ask-gg-garden-thievery-and-the-birth-of-bocephus)

Check out my very first blog entry about Psalms 46:1