Originally posted by Lasse Koskela:
This should do it:
Any idea why I'm getting a NullPointerException? In the meantime, I've found another way to convert the XML
doc into a string by serializing and then writing to a String, and here's that String:
Here's what it does to my
Tomcat:
Note that the method in which I used your code is called convertXMLToString, and it takes in the XML doc.