include “tinyxml2.h”
using namespace tinyxml2;
//读表
tinyxml2::XMLDocument doc;
std::string str = FileUtils::getInstance()->fullPathForFilename("xml/vip.xml");
if(doc.LoadFile(str.c_str()))
{
return ;
}
//load
XMLElement* rootNode = doc.RootElement();
XMLElement* childNode = rootNode->FirstChildElement();
while (childNode)
{
//字段
vipLevel = childNode->IntAttribute("Level");
int taskid = childNode->IntAttribute("SkipTask");
if(taskid==1)
{
break;
}
childNode = childNode->NextSiblingElement();
}
//返回立即完成需要的等级
return vipLevel;