You cannot change the value of an Element node using setNodeValue(). You
have to modify the text child(ren) to change the value. This is basic DOM
behavior.
Dave
"Tankel, Ifat"
<[EMAIL PROTECTED] To:
[email protected]
mverse.com> cc: (bcc: David N
Bertoni/Cambridge/IBM)
Subject:
XercesElementBridge::setNodeValue(...) did not update my Document way? and how
can I do
03/12/2002 08:17 it right?
AM
Hi
I have an xml file which is a template
for example:
<doc>
<name>
<first></first>
<last></last>
</name>
</doc>
I which to insert Text in the right node for example
<doc>
<name>
<first> Tankel </first>
<last> Ifat </last>
</name>
</doc>
I created a XalanDocument using the XercesParserLiaison and I called the
next method
void myDom::setValue(string xpath) {
XalanNode * foundNode=getNode(_evaluatorI,xpath);
// xpath value was "//first"
foundNode->setNodeValue(XalanDOMString("tryyyyyy"));
// to see the updated document I write the next 2 lines
_parserLiaison->destroyDocument(_xalanRealDoc[0]);
_xalanRealDoc[0]=_parserLiaison->createDocument(*_domDocument);
}
but using serialize to see the changes gave me the same template Document
without the update way?
how can I do the update?
Is there any example that I can use to see how can I do it.
I think DocumentBuilder sample is not the one I should use am I right?
I will be glad if some one will be able to help me
Regards
Ifat
<<...OLE_Obj...>>
[EMAIL PROTECTED]
Comverse Divisional Developer