I have this xml file
http://www.metacafe.com/tags/cats/rss.xml
With this code:
$xml = simplexml_load_file('http://www.metacafe.com/tags/cats/rss.xml', 'SimpleXMLElement', LIBXML_NOCDATA);
echo $xml->channel->item->title . "<br>";
echo $xml->channel->item->description . "<br>";
I get this OUTPUT:
Dad Challenges Kids to Climb Walls to Get Candy<br>
<a href="http://www.metacafe.com/watch/cb-M0fIp1ctKtsn/dad_challenges_kids_to_climb_walls_to_get_candy/"><img src="http://s3.mcstatic.com/thumb/11150410/28824820/4/directors_cut/0/1/dad_challenges_kids_to_climb_walls_to_get_candy.jpg?v=1" align="right" border="0" alt="Dad Challenges Kids to Climb Walls to Get Candy" vspace="4" hspace="4" width="134" height="78" /></a>
<p>
Nick Dietz compiles some of the week's best viral videos,
including an elephant trying really hard to break a stick, a cat
sunbathing and kids climbing up the walls to get candy. Plus,
making music with a Ford Fiesta.
<br>Ranked <strong>4.00</strong> / 5 | 78 views | <a href="http://www.metacafe.com/watch/cb-M0fIp1ctKtsn/dad_challenges_kids_to_climb_walls_to_get_candy/">0 comments</a><br/>
</p>
<p>
<a href="http://www.metacafe.com/watch/cb-M0fIp1ctKtsn/dad_challenges_kids_to_climb_walls_to_get_candy/"><strong>Click here to watch the video</strong></a> (02:38)<br/>
Submitted By: <a href="http://www.metacafe.com/channels/CBS/">CBS</a><br/>
Tags:
<a href="http://www.metacafe.com/topics/penna/">Penna</a>
<a href="http://www.metacafe.com/topics/bjbj/">Bjbj</a>
<a href="http://www.metacafe.com/topics/ciao/">Ciao</a> <br/>
Categories: <a href='http://www.metacafe.com/videos/entertainment/'>Entertainment</a>
</p>
<br>
I need get this output (than its need remove all others elements):
Dad Challenges Kids to Climb Walls to Get Candy
Nick Dietz compiles some of the week's best viral videos,
including an elephant trying really hard to break a stick, a cat
sunbathing and kids climbing up the walls to get candy. Plus,
making music with a Ford Fiesta.
I dont know how proceed to get this result.