void processNodeChildren(TiXmlNode* node, Model::geometryData* dData, Model::physicsData* pData) { TiXmlNode* child = NULL; for (child = node->FirstChild(); child; child = child->NextSibling()) { if(child->Type() == 1) { std::string typeName = ""; typeName = child->Parent()->Value(); if (typeName == "library_geometries") { extractVertices(child, dData); } else if (typeName == "library_physics_materials") { extractPhysicsMaterials(child); } else if (typeName == "library_physics_models") { extractPhysics(child, pData); } } processNodeChildren(child, dData, pData); } }
void Editor_Export::processNode (xmlNodePtr node) { switch (node->type) { case XML_ELEMENT_NODE: { openElementNode (node); processNodeChildren (node); closeElementNode (node); break; } case XML_ATTRIBUTE_NODE: { processAttributeNode (node); break; } case XML_TEXT_NODE: { processTextNode (node); break; } case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: case XML_ENTITY_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: case XML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_NOTATION_NODE: { break; } default: { string nodename ((char *) node->name); Database_Logs::log ("Unknown DOM node " + nodename + " while saving editor text"); break; } } }