Add pretty-print method for XML documents.