http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html#getDoctype()
- by Tom Brito
The Document class have a getDoctype method but doesn't have a setDoctype. The documentation says:
The DOM Level 2 does not support
editing the Document Type Declaration.
docType cannot be altered in any way,
including through the use of methods
inherited from the Node interface,
such as insertNode or removeNode.
and in my project I need to generate xml files with my specified doctypes.
I've tryied to create my own DefaultNode, but it throws "DOMException: Method not supported" for the setters.
Any idea?