c ++ linux库,用于创建xml和从xml读取(序列化/反序列化) [英] c++ linux library for creating an xml and reading from an xml (serialize/ deserialize)

查看:230
本文介绍了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++.

推荐答案

尝试 libxml2

但是您似乎想要对XML对象进行序列化和反序列化。 Boost :: serialization 可能会派上用场。

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读取(序列化/反序列化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆