xml-parser: ensure that traverse-collectors are only collecting xmlnodes.

This commit is contained in:
Kim Kulling
2020-09-02 21:48:58 +02:00
parent 87d2580aad
commit 0c05398602
2 changed files with 8 additions and 3 deletions
+3 -3
View File
@@ -235,11 +235,11 @@ public:
}
void collectChildrenPreOrder( XmlNode &node ) {
if (node != mParent) {
std::string name = node.name();
if (node != mParent && node.type() == pugi::node_element) {
mNodes.push_back(node);
}
for (XmlNode currentNode = node.first_child(); currentNode; currentNode = currentNode.next_sibling()) {
for (XmlNode currentNode : node.children()) {
collectChildrenPreOrder(currentNode);
}
}