DocumentType to OutputStream -- DocumentType is Lost
I am trying to do the following...
DocumentBuilder builder = DocumentBuilderFactory().newDocumentBuilder();
DOMImplementation domImpl = builder.getDOMImplementation();
DocumentType type = domImpl.createDocumentType("XXX", null, "My.DTD");
Document doc = domImpl.createDocument(null, "XXX", type);
I then try to do a transform:
DOMSource source = new DOMSource(doc);
StreamResult printResult = new StreamResult(System.out);
synchronized(transFactory)
{
transFactory.newTransformer().transform(source, printResult);
}
_
The result of this is that I do not see the <!DOCTYPE blah blah blah> part on the screen. I only see the rest of the document.
PLEASE HELP!!!!!!!

