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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了此XML文件似乎没有与之关联的任何样式信息相关的知识,希望对你有一定的参考价值。

尝试使用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>
答案

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

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

在php中显示它。

希望它有效!

以上是关于此XML文件似乎没有与之关联的任何样式信息的主要内容,如果未能解决你的问题,请参考以下文章

Chrome不会将我的XSLT样式表应用于我的本地XML文件

这是某种崩溃吗?啥时候修复?

visual studio 此文件没有与之关联的程序

Rest Web API 在本地服务器中显示记录,但在 IIS 中不显示

ViewPager 中的片段没有与之关联的活动

如何解决:登录桌面时自动运行的EXE提示“该程序没有与之关联来执行操作”,之后出现蓝屏代码0xc000021a