Calling org.apache.html.dom.HTMLDocumentImpl.cloneNode(true) when it contains a <!doctype ...> element results in a DOMException being thrown from org.apache.xerces.dom.CoreDocumentImpl.importNode(...).
CoreDocumentImpl uses a private importNode(...) method to do the cloning, which takes a flag of whether a cloning operation is taking place. There is a disconnect going from the HTMLDocumentImpl.cloneNode() call to the importNode call since the importNode method 'isCloning' flag is false, which causes the importing of a DOCUMENT node type to fail.
Is this a known problem? I ran into it while using HttpUnit.
thanks,
Randall Theobald
Staff Software Engineer, Austin, TX
IBM WebSphere Process Server Development
(512) 838-9349, t/l: 678-9349
[EMAIL PROTECTED]
- cloning doctype element in HTMLDocumentImpl Randall Theobald
- Re: cloning doctype element in HTMLDocumentImpl Michael Glavassevich
