Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rapidxml::xml_node<>* Container::toNode(rapidxml::xml_document<>* doc)
- {
- rapidxml::xml_node<>* containerNode = doc->allocate_node(rapidxml::node_element, "CONTAINER");
- char* objectType = doc->allocate_string(mObjectType.getString().c_str());
- char* objectID = doc->allocate_string(mObjectID.getString().c_str());
- containerNode->append_attribute(doc->allocate_attribute("objectType", objectType));
- containerNode->append_attribute(doc->allocate_attribute("objectID", objectID));
- for(ComponentMap::iterator iter = mComponents.begin(); iter != mComponents.end(); ++iter)
- {
- rapidxml::xml_node<>* node = iter->second->toNode(doc);
- containerNode->append_node(node);
- }
- return containerNode;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement