Hi,
Mannion, Enda wrote:
Hi,
In the code below setNodeValue is not updating the XML file with the new
value.
Am I doing this correctly?
for(int k = 0; k<childlist->getLength(); k++)
{
inNode = childlist->item(k);
if(DOMNode::ELEMENT_NODE == inNode->getNodeType())
{
char* nodeName = XMLString::transcode(inNode->getNodeName());
if(strcmp(nodeName, szTag.c_str()) == 0)
{
inNode->getFirstChild()->setNodeValue(DOMStr("Paddy"));
break;
}
}
}
Thats not what you want to do. Take a look at
http://xml.apache.org/xerces-c/apiDocs/classDOMNode.html#_details
for what each of the name/value/attrs mean. If you want to set the
content check out setTextContent.
Gareth
--
Gareth Reakes, Managing Director Embrace Mobile
+44-1865-811197 http://www.embracemobile.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]