I want to read some data from an xml rss . for example this is my xml item :
<item>
<title>
Oracle settles with the FTC over 'deceptive' Java security promises
</title>
<pubDate>Mon, 21 Dec 2015 13:39:00 -0800</pubDate>
<author>Katherine Noyes</author>
<dc:creator>Katherine Noyes</dc:creator>
<description>
<![CDATA[
<article> <section class="page"> <p> Security issues have long bedeviled users of Oracle's Java SE, and on Monday the Federal Trade Commission's efforts to address the problem finally came to fruition.</p><p> Oracle agreed to settle <a href="https://www.ftc.gov/system/files/documents/cases/151221oraclecmpt.pdf">charges</a> that it deceived consumers about the security provided by updates to its Java Standard Edition software, which is installed on some 850 million computers around the world, the FTC announced.</p><p> “When a company’s software is on hundreds of millions of computers, it is vital that its statements are true and its security updates actually provide security for the software,” said Jessica Rich, director of the FTC’s Bureau of Consumer Protection.</p><p class="jumpTag"><a href="/article/3017124/java-development/oracle-settles-with-the-ftc-over-deceptive-java-security-promises.html#jump">To read this article in full or to leave a comment, please click here</a></p></section></article>
]]>
</description>
<link>
http://www.computerworld.com/article/3017124/java-development/oracle-settles-with-the-ftc-over-deceptive-java-security-promises.html#tk.rss_all
</link>
<media:thumbnail url="http://zapt0.staticworld.net/images/article/2015/10/20151027-oracle-sun-logo-100625251-primary.idge.jpg"/>
<media:content url="http://zapt0.staticworld.net/images/article/2015/10/20151027-oracle-sun-logo-100625251-primary.idge.jpg"/>
<categories>
<category>Java Development</category>
<category>Application Development</category>
</categories>
</item>
now I want to get image url from this . now my code is :
if(localName.equalsIgnoreCase("enclosure")){
if(attributes.getValue("media:thumbnail") != null){
imgurl = attributes.getValue("media:thumbnail").toString();
Log.d("MyRssParser", imgurl);
}
}
but this code seem to have problem . sorry to my simple question ! I am new in this field ! thanks for any help .