开发者

Extract HTML from CDATA node in iPhone

开发者 https://www.devze.com 2022-12-16 22:42 出处:网络
<item> <data> <![CDATA[ <p>Test</p> <p><strong>Hi!</strong><br开发者_StackOverflow />Hello.</p>
<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

精彩评论

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