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>
Run Code Online (Sandbox Code Playgroud)
基本上我的要求是我需要能够提取该cdata.并且知道它是否是博客作者的评论作者.