I'm trying to parse rss data from this feed: http://fulltextrssfeed.com/feeds.bbci.co.uk/news/rss.xml, which was generated using using the FullTextRssFeed site. The only problem is that when I try to get the description, I receive '<', everything else is normal!. I've tried to use JSoup with this, but I'm not sure how to. Could you suggest how? The code I've used is the same as that used in this tutorial, but I've substituted the RSS URL used. Thanks again!
|
|||||||||||||
|
While searching the web for ideas on how to do this, I found out that doing this is actually illegal as it this method of getting content violates the terms of use of many of the web sources I was hoping to use. For now you will have to stick with short RSS feeds. |
|||
|
I would comment but I don't have enough points. I would recommend using yahoo pipes to redirect your rss feeds. You can even choose it to be redirected as json rather than xml. If your parser is working OK on most websites you visited this would be the easiest way to fix your problem. |
|||
|
The HTML you get from
Using Jsoup you can try this (untested): Instead of
use this:
with the following method:
This should work. Maybe some fine-tuning is necessary but that can be achieved quite easily with Jsoup's help. EDIT: This is what
|
|||||||||||
|
Your issue is because the description inside of your RSS feed contains html, rather than plain text. Here is the description content:
You'll need to alter the parser in some way that it can ignore the that are within the html content inside of description. Once you get the full html snippet out you can render it in a WebView. I think generally CDATA is used when there is some other type of XML content (in this case HTML) that is within an XML piece of data such as an RSS feed. Honestly though I am not to familiar with the ins and outs of it, I could be incorrect. |
|||
|