I have the same question!
the following is my xml file:
<?xml version="1.0"?>
<friends>
<friend>
<tel>
<home>05922192318</home>
<work>05923856923</work>
</tel>
</friend>
</friends>
i write the code:
TiXmlHandle docHandle( &pXMLDom );
Just when the nodeName="friends", node is not NULL,but I want to search the node by his name for examples "home" , then how can I get this node buy its tag Name?
Thanks in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I find a specific element.
example, I want to get to element named <list>. The element <soap1> and <soap2> might be there or not.
<soap1>
<soap2>
<list>
<item>
<name>name1</name>
<type>type1</type>
</item>
<item>
...
</item>
</list>
</soap2>
</soap1>
There is a discussion, subject: getElementsByTagName, and the reply was to use GetChildElement, but I don't think this function exists!!
thanks,
Lou.
I have the same question!
the following is my xml file:
<?xml version="1.0"?>
<friends>
<friend>
<tel>
<home>05922192318</home>
<work>05923856923</work>
</tel>
</friend>
</friends>
i write the code:
TiXmlHandle docHandle( &pXMLDom );
TiXmlNode* node = docHandle.FirstChild(nodeName).Node();
Just when the nodeName="friends", node is not NULL,but I want to search the node by his name for examples "home" , then how can I get this node buy its tag Name?
Thanks in advance!