Reputation: 402
I've try to read Rss Feed from multiple website, but some of this exposes your service (RSS) in a strange way, like this samples :
<item>
<title>"2012 Minutos a Nadar" em Guimarães</title>
<link>http://www.rtp.pt/noticias/index.php?article=534537&tm=3&layout=123&visual=61</link>
<description>
<![CDATA[
<img src="http://img0.rtp.pt/icm/thumb/phpThumb.php?src=/noticias/images/40/4031dece9b6d9384a6a021244cb0a36d&w=620&sx=0&sy=10&sw=560&sh=307&q=75&w=115"/>
Esta noite as piscinas municipais de Guimarães não vão encerrar. Vão ser 2012 minutos a nadar
sem paragens nem interrupções. Começou às 9 e meia da manhã e segue até ao final de domingo
Um encontro desportivo no âmbito da Capital Europeia da Cultura. A ideia passa pela festa da natação com cada um a nadar o que puder num máximo de 200 metros. As inscrições estão permanentemente a decorrer.
]]>
</description>
<guid>http://www.rtp.pt/noticias/index.php?article=534537&tm=3&layout=123&visual=61</guid>
<author>[email protected]</author>
<category>Desporto</category>
<category>Cultura</category>
<category>País</category>
<pubDate>Sat, 10 Mar 2012 16:42:02</pubDate>
</item>
It's possible for me get the 'img' on the descritpiton tag?! Or exclude this atribute from the descrition tag!?!?
Or in this sample :
<description><![CDATA[<p></p>]]>O militar norte-americano suspeito de ter matado 16 civis afegãos no domingo será julgado pela justiça militar dos Estados Unidos, anunciou esta segunda-feira o Pentágono./description>
Its possible remove the html tag '
' from description?Thanks in advance
Upvotes: 1
Views: 236
Reputation:
You would have to parse the CDATA section, however be aware that CDATA does not need to contain valid XML - that's the point of CDATA.
Upvotes: 1