- From: Ryan Lubke <Ryan.Lubke@Sun.COM>
- Date: 26 Oct 2001 15:51:59 -0400
- To: www-dom@w3c.org
Hello,
I'm looking for clarification on teh validity of appending
DocumentType nodes using Document.appendChild().
From consultations with peers, the Dom Lvl2 way of creating a Document
with a DocumentType is:
dtd = domImplementation.createDocumentType( "root", null, null );
domImplementation.createDocument( null, "root", dtd );
However should the following code work or throw a DOMException
of type WRONG_DOCUMENT_ERR:
document.appendChild(document.getImplementation().createDocumentType("root", null, null));
Thoughts? Comments?
Thanks,
Ryan Lubke
Received on Friday, 26 October 2001 15:46:57 UTC