Menu

Finding an element and returning its text

Simon
2006-03-28
2013-05-20
  • Simon

    Simon - 2006-03-28

    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

     
    • Lee Thomason

      Lee Thomason - 2006-03-31

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.