【问题标题】:feed problem in firefox and googleFirefox 和 google 中的 feed 问题
【发布时间】:2010-09-07 06:48:35
【问题描述】:

我在创建提要时遇到问题。它可以被 feedreader 读取,也可以在 Firefox 中显示,但在 google 中失败。

这是我的提要标题:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Myfeed</title>
<link>http://www.myfeed.com/</link>
<description>This is myfeedFeed</description>
<lastBuildDate>Mon, 12 agust 2105 11:17:00 GMT</lastBuildDate>
<language>en-us</language>

这是我的提要输出,包含 2 个项目

    <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/" >
<channel>
<title>myfeed Feed</title>
<atom:link href="http://www.localhost.com/" rel="self" type="application/rss+xml" />
<link>http://www.localhost.com/</link>
<description>This is myfeed Feed</description>
<lastBuildDate>Mon, 12 Sep 2015 18:37:00 GMT</lastBuildDate>
<language>en-us</language>
<sy:updatePeriod>weekly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<title>Hello Developer</title>
<link>http://localhost.com/</link>
<guid>http://localhost.com/</guid>
<pubDate>20100907</pubDate>
<dc:creator>myfeed</dc:creator>
<category><![CDATA[Developer]]></category>
<category><![CDATA[Tutorial]]></category>
<category><![CDATA[Wordpress]]></category>
<description><![CDATA[Hello developer license]]></description>
<license>Developer</license>

<quantity>1</quantity>
<filename>http://localhost.com/wp-content/uploads/downloads/2010/05/that.zip</filename>
<file_description>Hello developer license</file_description>
<diversion>1.1</diversion>
<hits>0</hits>
<user>myfeed</user>
<members>1</members>

<mirrors>1</mirrors>
</item><item>
<title>Hello Developer 2</title>
<link>http://localhost.com/</link>
<guid>http://localhost.com/</guid>
<pubDate>20100907</pubDate>
<dc:creator>myfeed</dc:creator>
<category><![CDATA[Developer]]></category>
<category><![CDATA[Tutorial]]></category>
<category><![CDATA[Wordpress]]></category>
<description><![CDATA[Hello developer license]]></description>

<license>Developer</license>
<quantity>1</quantity> 
<filename>http://localhost.com/wp-content/uploads/downloads/2010/06/this.zip</filename>
<file_description>Hello developer license</file_description>
<diversion>1.1</diversion>
<hits>0</hits>
<user>myfeed</user>
<members>1</members>
<mirrors>1</mirrors>
</item></channel>
</rss>

【问题讨论】:

  • 请发布完整的提要内容或至少完成 1 项。
  • “但在 google 中失败”是什么意思?谷歌浏览器?

标签: php firefox feed feedparser


【解决方案1】:

您的 XML 格式错误,Firefox 显示它只是因为它心情不错。明确地说,在第 38 行,您正在关闭一个尚未打开的 &lt;item&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-18
    • 2015-05-02
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 1970-01-01
    • 1970-01-01
    • 2023-03-28
    相关资源
    最近更新 更多