void FileItem::toXML(xmlpp::Element &root) { using namespace xmlpp; Element *tmp = root.add_child("file"); tmp->set_attribute("name",sFileName); }
void Character::toXML(xmlpp::Element &root) const { using namespace xmlpp; for (vector<std::string>::const_iterator it = vSkills.begin(); it != vSkills.end(); it++) { Element *tmp = root.add_child("skill"); tmp->set_attribute("value",*it); } }
void Character::toXML(const IOConfig &config, xmlpp::Element &root) const { using namespace xmlpp; for (vector<std::string>::const_iterator it = vProperties.begin(); it != vProperties.end(); it++) { Element *tmp = root.add_child(config.propertyName()); tmp->set_attribute("value",*it); } }
void Sobby::Config::ParentEntry::save(xmlpp::Element& elem) const { for(map_type::const_iterator iter = m_map.begin(); iter != m_map.end(); ++ iter) { Entry* entry = iter->second; xmlpp::Element* child = elem.add_child(entry->get_name() ); entry->save(*child); } }
void CharacterList::toXML(xmlpp::Element &root) const { using namespace xmlpp; for (vector<Character>::const_iterator it = vCharacters.begin(); it != vCharacters.end(); it++) { Element *tmp = root.add_child("character"); tmp->set_attribute("name",it->name()); tmp->set_attribute("playername",it->playerName()); it->toXML(*tmp); } }