This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
I am using the SDK JAXP implementation of DOM to parse a simple XML document containing a !DOCTYPE tag, make a minor modification and write it back to a file. All works fine except that the !DOCTYPE tag is not written to the StreamResult by the Transformer. getDoctype() on the Document does return a Doctype object that was parsed, but it's not written when transforming the Document into a StreamResult. How do I write the !DOCTYPE tag into the output? Please help. Nikhil