开发者

xml deserialization in c++

开发者 https://www.devze.com 2023-04-11 16:18 出处:网络
I want to write a C++ code that uses XML deserialization. Can any one please suggest an easy-to-use library for xml deserialization in c++, and a basic example code on how to deserialize an xml file w

I want to write a C++ code that uses XML deserialization. Can any one please suggest an easy-to-use library for xml deserialization in c++, and a basic example code on how to deserialize an xml file with it? I tried using the CMarkup library, but it does not work for my xml documents. It does not seem to be generic 开发者_运维知识库enough.

Thanks!


+1 to TinyXML. I used it in my past projects and it works pretty fine. The library is very simple, easy to maintain and quite stable. You do not need to compile TinyXML as a shared or static library - just add the TinyXML sources in your code and build it. As a result you will get rid of distributing any shared libraries with your program.


I've used both Xerces for C++ and LibXML in the past, and never found any major issues with either. Sample Xerces code is available here, and sample LibXML code is here.

While I've never tried it, I've heard some good things about TinyXML too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号