Reputation: 10971
I'm currently using Xerces library to parse a XML file in C++. I have the algorithm parser written, and the only thing missing is how to retrieve the value between two tags?
For example,
<name>John</name>
, I would like to be able to get the value John, so I could store in a string variable which I have for that purpose. I know that using
DOMElement * current = root->getFirstChildElement();
const XMLCh * tag = current->getTagName();
cout << XMLString::transcode(tag) << endl;
I will be able to print that tag, but I'm more interested in the value between tags. Any ideas?
Upvotes: 1
Views: 2886