Org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it?

I use this implementation to add Node from one XML document to other.

I use this implementation to add Node from one XML document to other. Node firstDocImportedNode = firstDoc. ImportNode(secondDocsNode, true); firstDocNode.

AppendChild(firstDocImportedNode ); See if this helps. Trick is just importing a Node to other Document, instead of directly appending.

You can't copy a node from one document and paste it to another. An attempt to do so results in this type of error. The node has to be properly imported.

If I remember well, the Document class offers the right methods for this common task. EDIT The problem might be in the code behind the setHold method. The element has to be imported.

If this is all autogenerated code, then looking for a newer version of axis could solve the problem. See my comment, where I mentioned an axis 1.3/1.4 issue.

Sorry I'm not sure what you mean, I can't see where I copy and pasted a node from one document to another. I'm using the client code generated from Axis2 wsdl2java. It generated a method for adding the element yet it causes an error when I add it?

– yurl Jul 6 '10 at 7:52 What's your axis version? There's at least on reported issue here: issues.apache. Org/jira/browse/AXIS-2705 – Andreas_D Jul 6 '10 at 8:12 I am using 1.4.I'll see if using 1.5 will fix it.

– yurl Jul 7 '10 at 1:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions