您当前的位置: 首页 >  c++

令狐掌门

暂无认证

  • 5浏览

    0关注

    513博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C++ tinyxml2解析xml文件【详细代码】

令狐掌门 发布时间:2020-05-10 23:01:10 ,浏览量:5

      xml解析,C++的方案很多,本篇介绍tinyxml2的用法,微信PC客户端目测用了tinyxml

     关于tinyxml2与tinyxml的区别,可以去官网看,如下:

     TinyXML-1 or TinyXML-2?

Both parsers:

  1. Simple to use with similar APIs.
  2. DOM based parser.
  3. UTF-8 Unicode support. http://en.wikipedia.org/wiki/UTF-8

Advantages of TinyXML-2

  1. The focus of all future dev.
  2. Many fewer memory allocation (1/10th to 1/100th), uses less memory (about 40% of TinyXML-1), and faster (~5x on read).
  3. No STL requirement.
  4. More modern C++, including a proper namespace.
  5. Proper and useful handling of whitespace

Advantages of TinyXML-1

  1. Can report the location of parsing errors.
  2. Support for some C++ STL conventions: stre
关注
打赏
1652240117
查看更多评论
立即登录/注册

微信扫码登录

0.0774s