I have a habit of using `:%!xmllint --format -` in vim any time I'm working with an xml file.