Hi

I had a code that worked fine with the library openxml. Now I wanted to
changed to Xerces. I parsed the XHTML-File and all worked fine, but when I
wanted to clone the Document I get the following Exception:

org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not
support the requested type of object or operation.
at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
at org.apache.html.dom.HTMLDocumentImpl.cloneNode(Unknown Source)

This was the code that was the reason for this exception:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setAttribute("http://apache.org/xml/properties/dom/document-class-na
me","org.apache.html.dom.HTMLDocumentImpl");
DocumentBuilder builder = factory.newDocumentBuilder();
domDocument = builder.parse(filename);
HTMLDocument doc = (HTMLDocument) domDocument.cloneNode(true);

Is this my fault or is it a bug in Xerces?

Regards,
        Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to