iPhone 有上百万种不同的 XML 解析器。我有一个中等大小的 XML 文件,其中包含大量重复标签(位于层次结构中的不同点)。我正在考虑 TBXML,但担心它缺乏 XPath 支持。例如,假设我的 XML 文件如下所示。
<blog>
<author> foo1 </author>
<comments>
<comment>
<text>
<![CDATA[ HTML code that must be extracted ]]>
</text>
<author>foo2</author>
</comment>
<comment>
<text>
<![CDATA[ Here is another post ]]>
</text>
<author>foo1</author>
</comment>
</comments>
</blog>