<guid isPermaLink="false">
<title>iphone cover 4</title>
<media:price>$35.95</media:price>
<media:thumbnail url="http://rlv.zcache.com/22.jpg"/>
<media:content url="http://rlv.zcache.com/440.jpg"/>
上面是我要读取的xml文件,我可以得到title、media price甚至Guid的isPermalink属性。但我无法获取media:thumbnail 属性 下面是我的代码。
foreach ($xml->channel->item as $cool)
{
$per = $cool->guid["isPermaLink"];
$thumb = $cool->children('media', true)->price;
$title = $cool->title;
$thumb = $cool->children('media', true)->thumbnail["url"];
}
如何获取media:thumbnail 属性?