Im trying to parse the following XML :
<item><title><![CDATA[Van Gaal: Keep the faith]]></title><description><![CDATA[Manchester United manager Louis van Gaal is in a bullish mood ahead of Monday's trip to face West Brom in front of the Sky Sports cameras.]]>
</description><link>http://www1.skysports.com/football/news/11667/9520895/premier-league-manchester-united-boss-louis-van-gaal-remains-confident</link>
<guid isPermaLink="false">11661_9520895</guid>
<pubDate>Fri, 17 Oct 2014 16:48:00 GMT</pubDate>
<category>News Story</category>
<enclosure type="image/jpg" url="http://img.skysports.com/14/09/128x67/football-louis-van-gaal-manchester-united_3202836.jpg" length="123456" /></item>
I am using the following code in my PHP script
$url = $xml->channel->attributes ()->items[$i]->enclosure->url;
But im not having much luck getting the url for the image. I have tried using the attribute() function, that didn't work.
Any suggestions would be gratefully appreciated .
Thanks