views:

680

answers:

1
<item>
<data>
  <![CDATA[
  <p>Test</p>
  <p><strong>Hi!</strong><br />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&amp;can=1&amp;q=cdata

+1  A: 

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

Marcus S. Zarra
Indeed! Automatic CDATA parsing and clean HTML into NSString to put it into UIWebView use `[myWebView loadHTMLString:myHTMLString baseURL:[NSURL URLWithString:@"http://www.mysite.com"]];`
Swizzy