2

I am currently working on RSS app (iOS), and i'm able to parse XML data to my TableView and display the images of the feeds to UIImageView.

Being more specific, i'm just able to get the thumbnail images on the CNN Money article for example, but i need the normal size images, to display in my UIImageView.

Feeds URL example - http://rss.cnn.com/rss/money_latest.rss

In this XML feed, i just only have one tag for grab images "media:thumbnail". How can i access the normal images, displayed when you open the full article?

Thanks in advance!

Edward.

Edward
  • 61
  • 1
  • 10

1 Answers1

1

You rss doesn't have the url of the normal image, but yes you can get it from parsing the details page which is link in your rss feed.

Open the link and try to find how can you get the <img src=> tag for the normal image in the link url.

You can simple use NSString substring function to get the src from the tag.. In your case as I seen the Normal Imagecan be extract from the trend <div id="ie_dottop"> the image tag after this div tag contains the normal image url, try to read the html page and parse, you will be able to get.

All the Best.

iphonic
  • 12,615
  • 7
  • 60
  • 107
  • If i understand well, now i have one parser for XML, and to be able to grab the same image, only bigger, i need to create another parser, but for HTML, is that right? Until now, i just find images in normal size (all the times), inside of the HTML tags. Only a few XML feeds have the big images inside them, right? Hey, thanks a lot for you answer, i really appreciate that. Sorry for my english, i'm foreigner (Brazil)! – Edward Apr 21 '13 at 04:19
  • Yes you need to create your own parser for parsing the detail HTML page, but not using the XML parsing, as I said, you will need to do string parsing for the HTML to extract the exact `img src` you need.. – iphonic Apr 22 '13 at 05:28