在C ++(Win32)中解析XML的方法 [英] Ways to parse XML in C++ (Win32)

查看:656
本文介绍了在C ++(Win32)中解析XML的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来解析Windows中的C ++中的XML,我发现了一些如MSXML,Xerces,TinyXml等,但我想知道哪些是最好的性能和功能。我的要求是,它必须能够静态链接或包含在项目本身的源,不必要求任何额外的工具,如提升。 MSXML将是一个明显的选择,因为它是一个MS库,但它似乎是一个COM库,并相当复杂,实际上得到任何使用它。

I'm looking for a way to parse XML in C++ in Windows and I've found a few such as MSXML, Xerces, TinyXml etc but I'm wondering which is best in terms of performance and features. My requirements are that it must be able to be static linked or have the source included in the project itself and must not require any additional toolits such as boost. MSXML would be the obvious choice as it's an MS library but it seems to be a COM library and rather convoluted to actually get any use out of it.

有人有任何

感谢,
J

Thanks, J

推荐答案

我使用libxml成功。 API有点混乱和复杂,但一旦你得到它它工作相当不错。除此之外它充满了功能,所以如果你需要,去libxml。
你不必担心膨胀的二进制文件,因为你只能链接你需要的部分。你不需要包括完整的libxml如果你只需要解析xml和不使用xpath的东西例如

I used libxml with success. The API is a bit confusing and complicated, but once you get it it works pretty good. Besides it is stuffed with functionality, so if you need that, go with libxml. You dont have to worry about bloated binaries since you can only link the parts you need. You dont need to include the complete libxml if you only need to parse xml and dont use the xpath stuff for example

这篇关于在C ++(Win32)中解析XML的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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