Display HTML extracted from XML file in a tableView

551 views Asked by At

So I have an XML file that looks a little like this

<xml>
    <post>
      <![CDATA[
        THis is the HTML inside of the CData
        <br>
        I want this to be parsed and displayed in a UITableView
      ]]>
    </post>
    <post>
      <![CDATA[
         <img src="http://foo.com/foo.jpg" />
      ]]>
   </post>
</xml>

I am able to extract the CDATA and assign it to an array. However, I need a simple way to parse it and display it in the UITableView. Just basic stuff such as displaying images.

1

There are 1 answers

0
AudioBubble On BEST ANSWER

First I'd use libxslt and convert to pure html and use the SeismicXML iPhone sample - http://discussions.apple.com/thread.jspa?threadID=1599127

There is a great deal of information about parsing the data correctly and string corrections of html data. Though, again I'd use the built in libxslt.