本文介绍了c ++ linux库,用于创建xml和从xml读取(序列化/反序列化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Ubuntu中工作。我有一个带类和很多嵌套类的.h文件。我想从一个对象创建一个XML文件。有人可以给我一个可以创建XML文件,序列化和反序列化对象的库吗?我正在使用g ++进行编译。
I am working in Ubuntu. I have a .h file with a class and a lot of nested classes. I would like to create an XML file from an object. Can someone please give me a library that creates XML files, serializes, and deserializes objects? I am compiling with g++.
推荐答案
尝试。
但是您似乎想要对XML对象进行序列化和反序列化。 可能会派上用场。
But it seems like you want to serialize and desirialize an object from and to XML. Boost::serialization might come in handy. it also supports serialization from and to XML.
,您可以找到使用XML进行Boost :: serialization的示例。
Here you can find an example for Boost::serialization with XML.
这篇关于c ++ linux库,用于创建xml和从xml读取(序列化/反序列化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!