我正在努力用 C 语言为我的应用程序创建一个库。我想在我的代码中解析一个 XML 文件。 那么,我怎样才能在 C 中做到这一点?
我知道它的 java 实现,但我如何在我的 C 代码中解析 XML?
可用于该目的的库有哪些?
最佳答案
我建议 Expat ,我已经在很多项目中使用过,它使用起来非常简单,开销也非常小。它的代码库也相当稳定。
Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags).
但是对于提到的每个其他外部项目,您都需要自己构建它。
关于android - C: 如何在 android 中解析 XML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13796369/