http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html#getDoctype()

Posted by Tom Brito on Stack Overflow See other posts from Stack Overflow or by Tom Brito
Published on 2010-03-29T20:10:48Z Indexed on 2010/03/29 20:13 UTC
Read the original article Hit count: 453

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml