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.

4

1 回答 1

1

您的 rss 没有普通图像的 url,但是是的,您可以通过解析linkrss 提要中的详细信息页面来获取它。

打开链接并尝试查找如何在url中获取<img src=>普通图像的标签。link

您可以简单地使用NSString substring函数从标签中获取 src。在您的情况下,正如我所看到的,Normal Image可以从趋势中提取<div id="ie_dottop">该标签包含正常图像 url 之后的图像标签div,尝试读取 html 页面并解析,您将能够得到。

一切顺利。

于 2013-04-21T02:59:53.180 回答