Read CDATA from RSS Feed

Bernd68

Member
Licensed User
Longtime User
Hi all,

i used the example from the forum to create an RSS Reader.
It works fine for most rss-feeds, but i am struggling i.e. with the following feed, that contains a CDATA-section within "Description"

Major Economic Indicators Latest Numbers

Can anyone point me in the right direction, how to extract
the single "items/paragraphs" from the CDATA-Section?

An example would be highly appreciated.

Regards
Bernd
 

Arun

Member
Licensed User
Longtime User
Unable to extract relevant text from Description element.

Hi!

I am using the RSS Reader example with the following link:

Top Headlines - The Times of India

It works perfect except for the Description element which gives the text as is.

Is there any way to extract the description text?

I am not too familiar with HTML coding, so a small example or code statement would help. Is it safe to assume that the & character is the beginning of an HTML element? Some workaround like that is also okay.

B4X:
<item><title>Court summons Digvijaya Singh in defamation case by Nitin Gadkari</title><link>http://timesofindia.feedsportal.com/fy/8at2EuL0gmS0b3XG/story01.htm</link>

<description>Senior Congress leader Digvijaya Singh was on Saturday summoned by a Delhi court to face trial in a criminal defamation case lodged against him by BJP president Nitin Gadkari.&lt;img width='1' height='1' src='http://timesofindia.feedsportal.com/c/33039/f/533965/s/25ade5b5/mf.gif' border='0'/&gt;&lt;div class='mf-viral'&gt;&lt;table border='0'&gt;&lt;tr&gt;&lt;td valign='middle'&gt;&lt;a href="http://share.feedsportal.com/viral/sendEmail.cfm?lang=en&amp;title=Court+summons+Digvijaya+Singh+in+defamation+case+by+Nitin+Gadkari&amp;link=http%3A%2F%2Ftimesofindia.indiatimes.com%2Findia%2FCourt-summons-Digvijaya-Singh-in-defamation-case-by-Nitin-Gadkari%2Farticleshow%2F17255021.cms" target="_blank"&gt;&lt;img src="http://res3.feedsportal.com/images/emailthis2.gif" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td valign='middle'&gt;&lt;a href="http://res.feedsportal.com/viral/bookmark.cfm?title=Court+summons+Digvijaya+Singh+in+defamation+case+by+Nitin+Gadkari&amp;link=http%3A%2F%2Ftimesofindia.indiatimes.com%2Findia%2FCourt-summons-Digvijaya-Singh-in-defamation-case-by-Nitin-Gadkari%2Farticleshow%2F17255021.cms" target="_blank"&gt;&lt;img src="http://res3.feedsportal.com/images/bookmark.gif" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://da.feedsportal.com/r/149379748645/u/192/f/533965/c/33039/s/25ade5b5/a2.htm"&gt;&lt;img src="http://da.feedsportal.com/r/149379748645/u/192/f/533965/c/33039/s/25ade5b5/a2.img" border="0"/&gt;&lt;/a&gt;&lt;img width="1" height="1" src="http://pi.feedsportal.com/r/149379748645/u/192/f/533965/c/33039/s/25ade5b5/a2t.img" border="0"/&gt;</description>

<pubDate>Sat, 17 Nov 2012 10:36:56 GMT</pubDate><guid isPermaLink="false">http://timesofindia.indiatimes.com/india/Court-summons-Digvijaya-Singh-in-defamation-case-by-Nitin-Gadkari/articleshow/17255021.cms</guid>
Thanks in advance!

Arun
 
Upvote 0

Arun

Member
Licensed User
Longtime User
Solution worked, but further help required, please

I am getting the text with webview along with the links for "Email this" and "Bookmark this" which must be a part of the Description element.

Anyway of suppressing these links, or extracting plain text from the webview and putting it in a label/button etc.

Thanks once again in advance. The quick response is highly appreciated.:icon_clap:

Arun
 
Upvote 0

Arun

Member
Licensed User
Longtime User
Thanks!

I have done so much manually only to find a single command later on when looking up something else, which is the reason I asked.

I am a java illiterate, but am attempting to pitch an android app only because I found your product. If anything beats your product, it is your service! Combine this with your policy of posting everything on the forums, including samples/libs/code and the concepts become really clear. :sign0098:
Thanks one again for opening up a new avenue for people like me!

Arun
 
Upvote 0
Top