Below I read an xml-file (rss feed from Picasa). The media-tags are in a namespace, hence I have to access them through the children() method. And I am successful in doing that - i.e. the expression "echo (String)$media2[1];" echos the nodevalue.

I need to get the attribute data from the nodes, though. I try to do that with i.e. the expression "echo (String)$media2[0]['url'];" - and nothing comes out of it - although the node definately has a url-attribute:
Code:
<media:content url='http://lh4.ggpht.com/_hyRpI70q6R4/SdSkNdfGxyI/AAAAAAAACQc/XXefthQ5WwU/DSC_0175.JPG' height='1106' width='1600' type='image/jpeg' medium='image'/>
Can anyone see what goes wrong?

PHP Code:
$pic simplexml_load_file('xml/picasaphotos-all.xml');
$media=$pic->channel->item[0]->children('http://search.yahoo.com/mrss/');
$media2=$media->children('http://search.yahoo.com/mrss/');

echo (String)
$media2[0]['url'];
echo 
$media2[0]['height'];
echo (String)
$media2[1];
echo (String)
$media2[2]['type'];
echo (String)
$media2[3];
echo (String)
$media2[4];
echo (String)
$media2[5];
echo (String)
$media2[6]; 
The xml-file I'm importing can be found here:
http://ellehauge.net/xml/picasaphotos-all.xml (1.4MB)