I see your point about elementsByTagName. Must've glossed over that when I read it earlier. iChild has a comment next to it describing what it is and where it's from, but in fact it was related to a bug I found in my code, so it no longer exists.
The way I was processing the children of both a <Container> and an <Element> was to get their child nodes (actually in the case of the <Element>, it was the children of <Children>) with childNodes() and parse each in a for loop.
What I've now done, thanks to an example from a work acquaintance, is grab the firstChildElement() and use something similar to:
while (!iChild.isNull())
{
parseFunction(iChild);
iChild = iChild.nextSiblingElement();
}
QDomElement iChild = iParent.firstChildElement();
while (!iChild.isNull())
{
parseFunction(iChild);
iChild = iChild.nextSiblingElement();
}
To copy to clipboard, switch view to plain text mode
Strangly enough, I had used this method before with TinyXML in a school project a while back but it didn't hit me until I saw it in an example. But, it is now working and I'm on to other things.
Thanks for the reply!
Bookmarks