I am using urllib and beautifulsoup to parse xml file in django. I can't parse the content of description tag with CDATA.
my xml tag.
<item>
<title>EU Confronting US Over Surveillance</title>
<description><![CDATA[Voice of America is an international news and broadcast organization serving Central and Eastern Europe, the Caucasus, Central Asia, Russia, the Middle East and Balkan countries]]></description>
<guid>http://www.voanews.com/content/eu-confronting-us-over-surveillance/1778928.html</guid>
</item>
This description tag is inside the item tag views.py
for i in soup.findAll('item'):
print i.description.string
If CDATA is not there means I can parse the contents inside descirption tag. I don't know how to parse this content. Please help me out Also how to get the image inside the tag..
<description><img src='http://static.ibnlive.in.com/ibnlive/pix/sitepix/10_2013/tony-abbott-visits-afghanistan-says-australias-war-is-over_291013013344_338x225.jpg' width='90' height='62'><p>"Australia's longest war" is ending and its defence forces mission in Afghanistan will be complete by 2013 end, Prime Minister Tony Abbott announced in a statement on Tuesday.</p></description>