I am parsing some XML from an RSS feed (using NSXMLParser) for a blog and would like to display the data for each post in a table cell. The XML looks like this:
<item>
<title>Blog post 1</title>
.
.
</item>
<item>
<title>Blog post 22</title>
.
.
</item>
How would I store this data so that it is available to my tableView:cellForRowAtIndexPath method?
I am thinking of creating a dictionary for each post item and appending these dictionaries to an NSMutableArray. This way I would be able to do something like,
cell.textLabel.text = [[mutableArray objectAtIndex: row] objectForKey: @"title"];
What do you reckon? I'm curious to know how you would approach this problem...
Thanks