开发者

Extract HTML from CDATA node in iPhone

<item>
<data>
  <![CDATA[
  <p>Test</p>
  <p><strong>Hi!</strong><br开发者_StackOverflow />Hello.</p>
  ]]>
</data>
</item>

Using TouchXML/NSXMLParser How can i extract only the HTML part into a string/appropriate data format so that I can display it in a UIWebView?

It's definitely possible: http://code.google.com/p/touchcode/issues/detail?id=36&can=1&q=cdata


TouchXML will parse it automatically. If you retrieve the stringValue of the CXMLElement you will get the full "raw" html back, properly formed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜