xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William_D_Web...@techsol.com
Subject question on setNodeValue() and appending nodes
Date Tue, 20 Jun 2000 22:07:40 GMT


Hello all;
  I am attempting to append a newly created node to an existing DOM tree, then
set the value of that node.
The adding of the node seems to work fine, but I am unable to set the value of
the node.
Environment is xerces ver 1.0.4, Win 2000, and java 1.2.

//************************************************
// myDom is existing good DOM Tree in memory.
Element errorNode = MyDOM.createElement("error");
errorNode.setNodeValue("Some_Error");
Node myNode = XPathAPI.selectSingleNode(MyDOM , "//commands/command/response");
myNode.appendChild(errorNode);
//*************************************************


After this code is ran; sure enough there is a new error node in the right place
 in the DOM Tree, but it doesn't have any value. I have tried perhaps 20 small
variations on this code-- no worky...
Any insight?

Cheers, Will



Mime
View raw message