我正在寻找一个简单、干净、正确的 XML 解析器以在我的 C++ 项目中使用.我应该自己写吗?
I am looking for a simple, clean, correct XML parser to use in my C++ project. Should I write my own?
RapidXML?RapidXML 是一个用 C++ 编写的非常快速和小型的 XML DOM 解析器.它主要针对嵌入式环境、计算机游戏或任何其他需要可用内存或 CPU 处理能力的应用程序.RapidXML 在 Boost 软件许可下获得许可,其源代码可免费获得.
How about RapidXML? RapidXML is a very fast and small XML DOM parser written in C++. It is aimed primarily at embedded environments, computer games, or any other applications where available memory or CPU processing power comes at a premium. RapidXML is licensed under Boost Software License and its source code is freely available.
功能
限制
来源:wikipedia.org://Rapidxml
根据您的用途,您可以使用 XML 数据绑定吗?CodeSynthesis XSD 是 Code 开发的用于 C++ 的 XML 数据绑定编译器在 GNU GPL 和专有许可证下合成和双重许可.给定一个 XML 实例规范(XML Schema),它生成表示给定词汇表以及解析和序列化代码的 C++ 类.
Depending on you use, you may use an XML Data Binding? CodeSynthesis XSD is an XML Data Binding compiler for C++ developed by Code Synthesis and dual-licensed under the GNU GPL and a proprietary license. Given an XML instance specification (XML Schema), it generates C++ classes that represent the given vocabulary as well as parsing and serialization code.
CodeSynthesis XSD 的独特功能之一是它支持两种不同的 XML 模式到 C++ 的映射:内存中的 C++/树和面向流的 C++/解析器.C++/Tree 映射是具有树状内存数据结构的传统映射.C++/Parser 是一种新的、类似于 SAX 的映射,它将存储在 XML 实例文档中的信息表示为特定于词汇表的解析事件的层次结构.与 C++/Tree 相比,C++/Parser 映射允许处理无法放入内存的大型 XML 文档、执行面向流的处理或使用现有的内存表示.
One of the unique features of CodeSynthesis XSD is its support for two different XML Schema to C++ mappings: in-memory C++/Tree and stream-oriented C++/Parser. The C++/Tree mapping is a traditional mapping with a tree-like, in-memory data structure. C++/Parser is a new, SAX-like mapping which represents the information stored in XML instance documents as a hierarchy of vocabulary-specific parsing events. In comparison to C++/Tree, the C++/Parser mapping allows one to handle large XML documents that would not fit in memory, perform stream-oriented processing, or use an existing in-memory representation.
来源:wikipedia.org://CodeSynthesis XSD
这篇关于什么是 C++ 的最佳开放 XML 解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!