[转贴]ATOM和RSS的区别
原文出處:http://lyyshare.spaces.live.com/Blog/cns!89899F580BB17FB4!166.entry
?
每次到國外的大牛的BLOG上去看文章都看到人家都有RSS和ATOM兩種訂閱方式,每次都不知道有什么區別。感覺ATOM是晚RSS出現的,還知道兩種都是FEED的輸出形式。難道兩者的區別就在于ATOM能夠輸出全文,RSS輸出摘要么?
上網Google了一下,找到一篇文章使用 RSS 和 Atom 實現新聞聯合中提及兩者的相似點與不同點。
RSS 和 Atom 摘要的相似點
?
每個摘要文件實際上代表一個通道。它包含通道標題、鏈接、描述、作者等等。通道信息提供關于摘要的基本信息。通道信息之后是一些項。每項代表一篇可以從摘要閱讀器閱讀的真實的新聞或者文章。通常情況下,每項包含有標題、鏈接、更新時間和摘要信息。
RSS 和 Atom 摘要的不同點
參考 RSS 2.0 and Atom 1.0, Compared,回顧 RSS 和 Atom 的不同點。
不同點 RSS 2.0 Atom 1.0 部署 RSS 2.0 得到廣泛部署。 Atom 1.0 還未得到廣泛部署。 規范 哈佛大學擁有版權并凍結了 RSS 2.0 規范。 Atompub 工作組(屬于 IETF)就 Atom 1.0 規范達成一致意見,并在將來有可能重新修訂。 所需內容 RSS 2.0 包含所需的摘要級別的標題、鏈接和描述。它不需要在摘要中出現的任何單獨項的字段。 Atom 1.0 包含摘要和條目所需的標題(可以為空)、惟一標識和最后更新的時間戳。 有效負載(payload) RSS 2.0 可以包含普通文本或者轉義 HTML,但是不能分辨所提供的是兩個中的哪一個。 Atom 1.0 包含有效負載容器。 全部或者部分內容 RSS 2.0 有一個 <description> 元素,可以包含條目的全部文本或者大綱。它沒有用于標識內容是否完全的內置方法。 Atom 1.0 提供單獨的 <summary> 和 <content> 元素。如果它是非文本的或者非本地的內容,出于可訪問性的原因摘要將很好用。 自動發現 RSS 2.0 用不同的方法實現自動發現。 Atom 1.0 標準化自動發現。 提取和聚合 RSS 2.0 只有一個可識別的形式:一個 <rss> 文檔。 Atom 1.0 允許獨立的 Atom Entry 文檔,可以使用任何網絡協議傳輸;例如,XMPP。Atom 也支持聚合摘要,其中,條目指向它們來自的摘要,前提是如果它們將被包含到其他摘要中。 RSS 和 Atom 具有相似的基于 XML 的格式。它們的基本結構是相同的,只在節點的表達式上有一點區別。在RSS 2.0 and Atom 1.0, Compared中,在內容的比較上:
<description> element which is commonly used to contain either the full text of an entry or just a synopsis (sometimes in the same feed), and which sometimes is absent. There is no built-in way to signal whether the contents are complete.
Atom has separate <summary> and <content> elements. The summary is encouraged for accessibility reasons if the content is non-textual (e.g. audio) or non-local (i.e. identified by pointer).
進一步的:
The RSS 2.0 specification is copyrighted by Harvard University and is frozen. No significant changes can be made (although the specification is under a Creative Commons licence) and it is intended that future work be done under a different name; Atom is one example of such work.
Atom 1.0 is specified inRFC 4287 (HTML Version); it represents the consensus of the Atompub Working Group within the IETF, as reviewed and approved by the IETF community and the Internet Engineering Steering Group. The specification is structured in such a way that the IETF could conceivably issue further versions or revisions of this specification without breaking existing deployments, although there is no commitment, nor currently expressed interest, in doing so.
看起來,注重于兩者的區別,更多的是了解ATOM是對RSS2.0的改進就可以了。
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的[转贴]ATOM和RSS的区别的全部內容,希望文章能夠幫你解決所遇到的問題。