pugixml 与tinyxml
简短的问题:对pugixml和tinyxml的比较有什么评论吗?
细节 我需要使用 XML 解析器/编写器。我的软件是用 C++ 编写的。
在我看来,TinyXML 和 pugixml 都是不错的选择(RapidXML 也不错,但它的界面似乎不像上面两个那么容易,因为我必须自己管理数据分配)。
大家对两者的比较有什么看法吗?我正在开发嵌入式平台,因此内存处理对我来说很重要,并且我需要能够解析和写入 XML 数据。
速度并不那么重要,重要的是内存使用率和更简单的界面。
谢谢。 PS 我正在处理的 XML 文件相当小(最大大小 = 1200 字节;最大元素 = 6 或 7;XML 文件相当简单)。
Short question: any comments on comparison of pugixml and tinyxml please?
Details
I need to use an XML parser/writer. My software is written in C++.
It seems to me TinyXML and pugixml are both good options (RapidXML is good as well but its interface does not seem to be as easy as the above two as I have to manage data allocations myself).
Do people have any comments on the comparison between the two? I am working on an embedded platform so memory handling is important to me, and I need to be able to both parse and write XML data.
Speed is not that important but memory usage and easier interface are.
Thanks.
PS The XML files I am dealing with are fairly small (max size=1200bytes; max elements=6 or 7; XML files are fairly simple).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用了tinyxml、QtXml、boost 属性树,而且据我所知,pugixml 是最快的 DOM xml 解析器。
至于嵌入式,我使用了 pugixml 和大约 9Mb 的 xml 文件 - 一切都运行良好且快速。但我不知道你的内存限制 - 只需编写简单的示例并检查即可。
I used tinyxml, QtXml, boost property tree, and, as I remember, pugixml is fastest DOM xml-parser.
As for embedded, I used pugixml with about 9Mb xml-files - and all works fine and fast. But I don't know about your memory limitation - just write simple example and check.
我 6 个月前使用过 TinyXML,我认为它非常棒......
I have used TinyXML 6 months ago, I think it is excellent...
你可以看看外籍人士。我已经在商业产品中使用它大约 8 年了,没有出现任何问题。它是开源的,具有非病毒许可证。
You might look at Expat. I have used it for about 8 years in a commercial product without any trouble. It is open-source with a non-viral license.