I was wondering if there is a function within the TinyXML libraries in which allows you to locate an element and extract its text.
For example: in MSXML they use XMLDoc.getElementsbyTagName("name"); where name is the element in which i want to extract the text from. Therefore I am wondering if theres a function that can locate the element by inputting the element name and then use element->GetText() to extract the text.
Thankyou in advance, any help would be greatlly appreciated.
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TiXmlElement::GetText() will pull the text out of an element. For finding a particular element, check out the tutorial or the example code. But using a TiXmlHandle is the easiest way to navigate to a known location.
lee
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I was wondering if there is a function within the TinyXML libraries in which allows you to locate an element and extract its text.
For example: in MSXML they use XMLDoc.getElementsbyTagName("name"); where name is the element in which i want to extract the text from. Therefore I am wondering if theres a function that can locate the element by inputting the element name and then use element->GetText() to extract the text.
Thankyou in advance, any help would be greatlly appreciated.
Simon
TiXmlElement::GetText() will pull the text out of an element. For finding a particular element, check out the tutorial or the example code. But using a TiXmlHandle is the easiest way to navigate to a known location.
lee