Ik wil graag met simple xml de tags van een foto uitlezen, alleen nu is dit element tamelijk complex, hoe krijg ik de tags nu eruit?

<item>
<title>blabla</title>
<media:category scheme="urn:flickr:tags">tag1 tag2</media:category>
</item>

de title haal ik er zo uit


$flickr_rss = simplexml_load_file($_url);


foreach ($flickr_rss->channel->item as $item) {

$link = (string) $item->link;
$media = $item->children('http://search.yahoo.com/mrss');
$thumb = $media->thumbnail->attributes();
$url = (string) $thumb['url'];
$width = (string) $thumb['width'];
$height = (string) $thumb['height'];
$title = (string) $item->title;
$pubDate = (string) $item->pubDate;
}

Reageren