0

我正在尝试解析此链接http://lawncare.ncsu.edu/RSSFeed.aspx中显示的图像并将其显示在 android 设备中。现在,我只能解析与图像关联的文本。任何人都可以就如何解析这些图像提出任何想法吗?最好不要使用 JSoup,因为我已经完成了一半的代码。

4

1 回答 1

0

尝试在此处查看此问题:如何使用 SAX 解析器解析 XML

特别是达米安和他的解决方案给出的答案。

这是我解析 rss 提要的代码的一部分:

     Bundle b = new Bundle();
 b.putString("title", feed.getItem(position).getTitle());
 b.putString("description", feed.getItem(position).getDescription());
 b.putString("content", feed.getItem(position).getContent());
 b.putString("link", feed.getItem(position).getLink());
 b.putString("pubdate", feed.getItem(position).getPubDate().toString());

我所做的是“字段”同时包含描述(文本)和图像。我将整个“内容”字段内容传递给 WebView 并正确显示图像和文本。

于 2012-07-31T17:05:55.790 回答