I have a problem like this:
I want modify the name element int the xml file below from “jack” to “joff”, but have not found an available member function in tinyXml. I use “InsertEndChild()” or “LinkEndChild()”, which only show me the connected string like “jackjoff”.
<member id=1>
<name>jack</name>
</member>
however, this is the code segment which can achieve my modification.
TiXmlText * text = new TiXmlText("joff");
TiXmlNode * oldNode = nameElement->FirstChild();
nameElement->RemoveVhild(oldNode);
nameElement ->LinkEndChild(text)