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 bu...@apache.org on 2002/12/11 09:27:47 UTC
DO NOT REPLY [Bug 15263] New: -
The clone element cannot append the new document
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15263
The clone element cannot append the new document
Summary: The clone element cannot append the new document
Product: Xerces2-J
Version: 2.2.1
Platform: All
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: amateur9999@hotmail.com
The clone elemnet from the document cannot append the other document!
example code is following :
org.w3c.dom.Document doc = db.newDocument();
org.w3c.dom.Document src = db.parse(sourceFile); ;
Node anElement = src.getDocumentElement();
Node cloneElement = anElement.cloneNode(false);
doc.appendChild(cloneElement);
error is :
Exception in thread "main" org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node
is used in a different document than the one that created it.
at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org