解决方案在这篇不错的文章中进行了解释。您需要
children()用于访问包含名称空间的XML元素的方法。此代码段摘自该文章:
$feed = simplexml_load_file('http://www.sitepoint.com/recent.rdf'); foreach ($feed->item as $item) { $ns_dc = $item->children('http://purl.org/dc/elements/1.1/'); echo $ns_dc->date; }


