【发布时间】:2014-02-08 06:10:18
【问题描述】:
我正在开发适用于 iOS 的每日圣经引用应用程序,我想知道如何解析在线托管的 XML 数据,以便在我的应用程序中显示在 UITextView 中。
<bible>
<title>John 1:14</title>
<item>
<bookname>John</bookname>
<chapter>1</chapter>
<verse>14</verse>
<text>
Now the Word became flesh and took up residence among us. We saw his glory – the glory of the one and only, full of grace and truth, who came from the Father.
</text>
</item>
<results>1</results>
</bible>
我正在考虑在一个UITextView 中解析<title>,在另一个UITextView 中解析<text>。有人能帮忙吗?使用 Apple 的 NSXMLParser 是否可行?
【问题讨论】:
-
也许这会有所帮助:stackoverflow.com/a/9884929/1153630