Pretty printing XML from within emacs

I use emacs. Can’t help it. Been using it for years, and the cost of switching to something “more modern” has never reached the payoff threshold.

Today I want to show you how I pretty-print XML from within emacs.

The elisp for the pretty-printing logic was originally from
a stackoverflow answer. I modified it slightly and post it here:

        
        
      

Thanks to isagalaev for highlight.js.