点击前往按钮进入随机一个本站友链,不保证跳转网站的安全性和可用性。本次随机到的是本站友链:

RSS 1.0、RSS 2.0 和 ATOM 三种标准格式的示例及其主要特点:

in 公告 with 1 comment

1. RSS 1.0 (基于 RDF)

<?xml version="1.0"?>
<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/">
  <channel rdf:about="http://example.com/rss">
    <title>示例频道</title>
    <link>http://example.com</link>
    <description>这是一个RSS 1.0示例</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://example.com/post1" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="http://example.com/post1">
    <title>文章标题</title>
    <link>http://example.com/post1</link>
    <description>文章内容摘要</description>
  </item>
</rdf:RDF>

特点


2. RSS 2.0 (更简单的主流格式)

<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>示例频道</title>
    <link>http://example.com</link>
    <description>这是一个RSS 2.0示例</description>
    <item>
      <title>文章标题</title>
      <link>http://example.com/post1</link>
      <description>文章内容摘要</description>
      <pubDate>Mon, 01 Jan 2024 12:00:00 GMT</pubDate>
      <guid isPermaLink="false">12345</guid>
    </item>
  </channel>
</rss>

特点


3. ATOM (更现代的格式)

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>示例频道</title>
  <link href="http://example.com"/>
  <updated>2024-01-01T12:00:00Z</updated>
  <author>
    <name>作者名</name>
  </author>
  <id>urn:uuid:12345</id>
  <entry>
    <title>文章标题</title>
    <link href="http://example.com/post1"/>
    <id>urn:uuid:67890</id>
    <updated>2024-01-01T12:00:00Z</updated>
    <summary>文章内容摘要</summary>
    <content type="html">这里是完整HTML内容...</content>
  </entry>
</feed>

特点


对比总结

特性RSS 1.0RSS 2.0ATOM
基础标准RDFXMLXML (W3C 标准)
根元素<rdf:RDF><rss version="2.0"><feed>
时间格式无严格要求RFC 822 (如 pubDate)ISO 8601 (如 updated)
扩展性依赖 RDF通过命名空间扩展原生支持丰富内容类型
典型用途语义网场景博客、播客现代应用(如 GitHub)
Responses
  1. [...]收录要求说明Blogs·CN(以下简称本站)是一个位于中国境内的平台,致力于发掘和分享"优秀个人独立博客"。为了确保规则的透明性和便于交流,我们制定了以下有关博客站点收录的标准:一、已经阅读并同意《博客入驻协议》二、已经阅读并同意《隐私协议》三、站点一定要有RSS-1.0 、RSS-2.0、ATOM ,标准格式的rss地址四、有在贵站链接本站如果您的站点符合以上要求,那么它符合本站的收录标准。我们[...]

    Reply