bool Map::Process(HoeUtils::XMLNode * cur) { if (!cur->IsName("world")) throw "root node is not world."; HoeUtils::XMLNode * child = cur->GetChild(); if (!child) throw "empty map."; do { if (child->IsName("mapinfo")) { this->ParseInfo(child); continue; } if (child->IsName("part")) { Part * p = new Part(); p->Process(child); this->parts.push_back(p); } } while (child->Next()); delete child; return true; }