Код: Выделить всё
Код: Выделить всё
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("assets/enemies.xml");
pugi::xml_node nodes = doc.child("Enemies");
for (pugi::xml_node tool = nodes.child("Enemy"); tool; tool = tool.next_sibling("Enemy"))
{
//only here to check if it's working
string lol = tool.attribute("name").as_string();
int hi = tool.attribute("id").as_int();
}
Подробнее здесь: https://stackoverflow.com/questions/151 ... -the-first