[英]Parsing XML in Pure C
在纯 C 中解析 XML 数据的首选库是什么?
C 的规范 XML 解析库是libxml2 。
Here is a list of libraries for multiple languages, including C:以下是多种语言的库列表,包括 C:
http://www.xml.com/pub/rg/XML_Parsers http://www.xml.com/pub/rg/XML_Parsers
Not 'the preferred library', but there's also http://www.minixml.org/ .不是“首选库”,但也有http://www.minixml.org/ 。
Mini-XML is a small XML library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard libraries.
Mini-XML 是一个小型 XML 库,您可以使用它在应用程序中读取和写入 XML 和类似 XML 的数据文件,而无需大型非标准库。 Mini-XML only requires an ANSI C compatible compiler (GCC works, as do most vendors' ANSI C compilers) and a 'make' program.
Mini-XML 只需要一个 ANSI C 兼容的编译器(GCC 可以工作,就像大多数供应商的 ANSI C 编译器一样)和一个“make”程序。
Mini-XML supports reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and strings.
Mini-XML 支持读取 UTF-8 和 UTF-16 以及写入 UTF-8 编码的 XML 文件和字符串。 Data is stored in a linked-list tree structure, preserving the XML data hierarchy, and arbitrary element names, attributes, and attribute values are supported with no preset limits, just available memory.
数据存储在链表树结构中,保留 XML 数据层次结构,并且支持任意元素名称、属性和属性值,没有预设限制,只有可用内存。
VTD-XML 是您应该研究的一种,如果您想要结合易用性、性能和效率
You can consider miniML-Parser , a simple and tiny XML parser library in C. It is specifically developed for embedded applications in mind.您可以考虑miniML-Parser ,它是 C 语言中的一个简单而微型的 XML 解析器库。它专为嵌入式应用程序而开发。
Disclosure: I'm author of this miniML-Parser
披露:我是这个 miniML-Parser 的作者
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.