1

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.

endy
  • 3,872
  • 5
  • 29
  • 43
  • 1
    This should help: http://stackoverflow.com/questions/1095782/using-nsxmlparser-with-cdata – stitz Nov 08 '10 at 04:11
  • :/ that topic seems to only cover the CDATA portion, which I am more then fine with. Its just the HTML parsing that is giving me a headache. Thanks for the speedy response though. – endy Nov 08 '10 at 04:29

1 Answers1

1

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.