c++ - Parsing <multi_path literal="not_measured"/> in TinyXML -
how parse following in tinyxml:
<multi_path literal="not_measured"/>
i able parse below line:
<hello>1234</hello>
the problem first statement not getting parsed normal way. please suggest how go this.
not 100% sure youre question asking here basic format loop through xml files using tinyxml:
/*xml format typically goes this: <value atribute = 'attributename' > text </value> */ tixmldocument doc("document.xml"); bool loadokay = doc.loadfile(); // error checking in case file missing if(loadokay) { tixmlelement *proot = doc.rootelement(); tixmlelement *element = proot->firstchildelement(); while(element) { string value = firstchild->value(); //gets value string attribute = firstchild->attribute("attribute"); //gets attribute string text = firstchild->gettext(); //gets text element = element->nextsiblingelement(); } } else { //error conditions }
Comments
Post a Comment