用于MFC C ++应用程序的最佳XML序列化库 [英] Best XML serialization library for a MFC C++ app

查看:351
本文介绍了用于MFC C ++应用程序的最佳XML序列化库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,用C ++编写,使用MFC和Stingray库。该应用程序适用于各种大型数据类型,这些类型都基于MFC Document / View序列化派生功能当前序列化。我还添加了基于Stingray库的XML序列化选项,它通过Microsoft XML SDK实现DOM。虽然容易实现的性能是可怕的,除非是非常小的文档,它是不可用的程度。

I have an application, written in C++ using MFC and Stingray libraries. The application works with a wide variety of large data types, which are all currently serialized based on MFC Document/View serialize derived functionality. I have also added options for XML serialization based on the Stingray libraries, which implements DOM via the Microsoft XML SDK. While easy to implement the performance is terrible, to the extent that it is unusable on anything other than very small documents.

你会为此推荐什么其他XML序列化工具场景。我不想要DOM,因为它似乎是一个记忆猪,我已经处理大量的内存数据。理想情况下,我想要一个流解析器是快速,易于使用MFC。我目前的前跑者是 expat ,它快速简单,但需要添加大量的class by class serialization code。

What other XML serialization tools would you folks recommend for this scenario. I don't want DOM, as it seems to be a memory hog, and I'm already dealing with large in memory data. Ideally, i'd like a streaming parser that is fast, and easy to use with MFC. My current front runner is expat which is fast and simple, but would require a lot of class by class serialization code to be added. Any other efficient and easier to implement alternatives out there that people would recommend?

推荐答案

Boost Serialization 库支持XML。这个库基本上包括:

The Boost Serialization library supports XML. This library basically consists in:


  1. 从MFC序列化的原理开始,并提供所有的好东西。

  2. 解决每一个MFC序列化的问题!

与MFC相比的改进之一是支持XML。
请注意,您不一定控制此序列化的XML模式。它使用自己的模式。

Among the improvements compared to MFC is support for XML. Note that you don't necessarily control the XML schema of this serialization. It uses its own schema.

这篇关于用于MFC C ++应用程序的最佳XML序列化库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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