You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jan Tesáček <ja...@brainsys.cz> on 2000/08/09 19:41:35 UTC

appendChild problem

Hi,
I have problem with this code in Xerces-J parser:

Element  eCopy = (Element)eSource.cloneNode(true);
eTarget.appendChild(eCopy);

When element eTarget has defined some OwnerDocument, this code throws
DOMExceptionImpl exception in
org.apache.xerces.dom.ChildAndParentNode.internalInsertBefore with message
"DOM005 Wrong document". I suppose that this may be bug in Xerces-J. When i
use importNode() everything is OK, but  I have used
cloneNode()-appendChild() in many casses and I think that rewrite everything
is not way.
    Thanks for help
        Jenda Tesacek