Mijn code voor scanning:
Code: Select all
std::cout << "All floats found: " << std::endl;
for (TiXmlElement* node=root->FirstChildElement("float"); node != NULL; node->NextSiblingElement("float") ) {
if (node->Attribute("value") != NULL) {
std::cout << node->Attribute("value") << std::endl;
}
continue;
}
Code: Select all
<?xml version"1.0" ?>
<root>
<ignore value="Hello World!" />
<float value=42.0/>
<ignore />
<float value=42.1/>
<float value=42.2/>
</root>
Code: Select all
All floats found:
42.0
Code: Select all
All floats found:
42.0
42.1
42.2