Menu

Parsing without knowing node names

hamnu
2005-10-28
2013-05-20
  • hamnu

    hamnu - 2005-10-28

    Hello!

    Is there a way to go through a xml document without using node-names?

    e.g. instead of
    "TiXmlHandle docHandle( &document );
        TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).Element();",
    I'd like to use something like:
    while x=docHandle.nextChild()
    {
    while y = x.nextChild
    {
    }
    }

    Regards,

     
    • Lee Thomason

      Lee Thomason - 2005-10-29

      Many!

      Check out FirstChild() and NextSibling() both in the docs and in the xmltest.cpp test file. You can also use IterateChildren().

      lee

       

Log in to post a comment.