Interesting/important comments were removed from this discussion:
How to pretty print XML from Java?
I agree comments need moderation, but moderation shouldn't remove explanation or clarification about the code sample itself, one of which specifically noted why this sample is just code instead of a class, after it was edited many many times to change it into some bloated mess.
Those kind of discussions shouldn't happen in the answer, but should be safe from overly zealous moderation in comments.