此XML文件似乎没有与之关联的任何样式信息

时间:2013-05-14 16:44:04

标签: php xml rss dreamweaver

尝试使用Dreamweaver和PHP进行开发。

在实际网站上,我突然发现了这个错误:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>
ABCDED
</title>
<cf:treatAs xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005">list</cf:treatAs>
<link>http://events.sjsu.edu/default.aspx</link>
<description>RSS Feed ABCD Events Calendar</description>
</channel>
</rss>

1 个答案:

答案 0 :(得分:0)

实际上,是否正在将XML文件回显到PHP页面中?

$xml = simplexml_load_file('URL');
  foreach ($xml->channel->channel as $value){ 
    $var1 = $value->link;
    $var2 = $value->description;
} 
echo $var1."<br>".$var2;

在php中显示。

希望它有效!