I wrote a simple wrapper for some of the QDom * classes, which simplifies working with XML in Qt.
For instance:
myxmlmap->$("tagnameq1")->$("tagname2.")->$("@attrname=attrvalue*").c.length()
Or even like this:
myxmlmap->$("tagname1>tagname2.>@attrname=attrvalue*").c.at(2).e.text()
"*" - all children of the tree from the current node. "" - only children of the first generation. e - node. c is a list of node children. all children found are also stored in the "c" attribute.
source
share