[cocos2dx-3.0] tinyxml2 loadFile真机下失败问题

直接用tinyxml2的loadFile,加载一个XML文件,在WIN PC下是能够的,但在真机下失败。xml

     const char* filepath = "test.xml";get

    tinyxml2::XMLDocument* xmlfile = new tinyxml2::XMLDocument();test

    auto ret = xmlfile->loadFile(filepath);  //这里失败file

修正:文件

    const char* filepath = "test.xml";co

    tinyxml2::XMLDocument* xmlfile = new tinyxml2::XMLDocument();new

    auto content = CCFileUtils::getInstance()->getDataFromFile(filepath);path

    auto ret = xmlfile->Parse((const char*)content.getBytes(), content.getSize());const

相关文章
相关标签/搜索