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

Reply via email to