1.问题:

cocos2d-x集成tinyxml后在vs下运行正常,但是在Android下在读取xml文件时发生异常,读取时使用的是LoadFile函数

2. 解决方案:

先把xml文件内容读取到内存中然后在解析就没问题了

std::string xmlfilePath = FileUtils:getInstance()->fullPathForFilename("text.xml");
ssize_t len = 0;
unsigned char *data = FileUtils::getInstance()->getFileData(xmlfilePath.c_str());
tinyxml2::XMLDocument *doc = new tinyxml2::XMLDocument();
doc->Parse((cahr *)data, len);
...

最新文章

  1. YourSQLDba设置共享路径备份
  2. Ubuntu下编译内核
  3. 对C++/CLR的一些评价
  4. UIWebview 禁止某个方向滚动
  5. 10、第十节课jq420151012
  6. ie8 hack
  7. 期末考试--nyoj-757
  8. C语言中的static 具体分析
  9. LindDotNetCore~Mock对实际应用中的意义
  10. MySQL 关于性能的参数配置梳理
  11. 做ctf题对malloc的疑问
  12. python-request-各方法使用及格式
  13. OneinStack——PHP多版本共存
  14. 记一次SQL性能优化,查询时间从4000ms优化到200ms.
  15. P4556 [Vani有约会]雨天的尾巴
  16. mysql中表里的数据重新设置自增的id的方法
  17. GNU与Linux
  18. python标准库介绍——15 fileinput 模块详解
  19. 记js的一个奇葩问题!!!!!!!!!!!!
  20. java生成pdf

热门文章

  1. Spring Security(06)——AuthenticationProvider
  2. 谷歌浏览器js debug
  3. 主题: jQuery异步调用KindEditor无法赋值【解决】
  4. 12.hibernate命名查询
  5. 玩玩RMI
  6. CentOS 修改主机名
  7. Leetcode015 3Sum
  8. highstock
  9. DLNA
  10. iOS 计算两个坐标之间的距离