MFC C++ 应用程序的最佳 XML 序列化库
我有一个使用 MFC 和 Stingray 库用 C++ 编写的应用程序.该应用程序适用于各种大型数据类型,这些数据类型目前都基于 MFC 文档/视图序列化派生功能进行序列化.我还添加了基于 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 ,它既快速又简单,但需要大量的逐类序列化代码要添加.人们会推荐任何其他有效且更易于实施的替代方案吗?
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 序列化 库支持 XML.这个库主要包含在:
The Boost Serialization library supports XML. This library basically consists in:
- 从 MFC 序列化的原理出发,把它提供的所有好东西都拿走.
- 解决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.
相关文章