You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Richard Wu <RW...@plexus.ca> on 2001/10/25 20:54:19 UTC

Node.appendChild(Node node)

I'm trying to append an attribute node in an element node (between source
and target documents). Everything appears to ok until calling appendChild()
which throws out HIERARCHY_REQUEST_ERR. Here is the code snipet:

Node sourceAttribute = sourceAttributeList.item(i); 
Node targetAttribute =
targetDocument.createAttribute(sourceAttribute.getNodeName());
targetAttribute.setNodeValue(sourceAattribute.getNodeValue()); 

targetNode.appendChild(targetAttribute); 

Any idea of what's happening here?

Thanks for any hint or suggestion!

Richard Wu