[转贴]ATOM和RSS的区别
原文出處:http://lyyshare.spaces.live.com/Blog/cns!89899F580BB17FB4!166.entry
?
每次到國外的大牛的BLOG上去看文章都看到人家都有RSS和ATOM兩種訂閱方式,每次都不知道有什么區(qū)別。感覺ATOM是晚RSS出現(xiàn)的,還知道兩種都是FEED的輸出形式。難道兩者的區(qū)別就在于ATOM能夠輸出全文,RSS輸出摘要么?
上網(wǎng)Google了一下,找到一篇文章使用 RSS 和 Atom 實現(xiàn)新聞聯(lián)合中提及兩者的相似點與不同點。
RSS 和 Atom 摘要的相似點
?
每個摘要文件實際上代表一個通道。它包含通道標(biāo)題、鏈接、描述、作者等等。通道信息提供關(guān)于摘要的基本信息。通道信息之后是一些項。每項代表一篇可以從摘要閱讀器閱讀的真實的新聞或者文章。通常情況下,每項包含有標(biāo)題、鏈接、更新時間和摘要信息。
RSS 和 Atom 摘要的不同點
參考 RSS 2.0 and Atom 1.0, Compared,回顧 RSS 和 Atom 的不同點。
不同點 RSS 2.0 Atom 1.0 部署 RSS 2.0 得到廣泛部署。 Atom 1.0 還未得到廣泛部署。 規(guī)范 哈佛大學(xué)擁有版權(quán)并凍結(jié)了 RSS 2.0 規(guī)范。 Atompub 工作組(屬于 IETF)就 Atom 1.0 規(guī)范達(dá)成一致意見,并在將來有可能重新修訂。 所需內(nèi)容 RSS 2.0 包含所需的摘要級別的標(biāo)題、鏈接和描述。它不需要在摘要中出現(xiàn)的任何單獨(dú)項的字段。 Atom 1.0 包含摘要和條目所需的標(biāo)題(可以為空)、惟一標(biāo)識和最后更新的時間戳。 有效負(fù)載(payload) RSS 2.0 可以包含普通文本或者轉(zhuǎn)義 HTML,但是不能分辨所提供的是兩個中的哪一個。 Atom 1.0 包含有效負(fù)載容器。 全部或者部分內(nèi)容 RSS 2.0 有一個 <description> 元素,可以包含條目的全部文本或者大綱。它沒有用于標(biāo)識內(nèi)容是否完全的內(nèi)置方法。 Atom 1.0 提供單獨(dú)的 <summary> 和 <content> 元素。如果它是非文本的或者非本地的內(nèi)容,出于可訪問性的原因摘要將很好用。 自動發(fā)現(xiàn) RSS 2.0 用不同的方法實現(xiàn)自動發(fā)現(xiàn)。 Atom 1.0 標(biāo)準(zhǔn)化自動發(fā)現(xiàn)。 提取和聚合 RSS 2.0 只有一個可識別的形式:一個 <rss> 文檔。 Atom 1.0 允許獨(dú)立的 Atom Entry 文檔,可以使用任何網(wǎng)絡(luò)協(xié)議傳輸;例如,XMPP。Atom 也支持聚合摘要,其中,條目指向它們來自的摘要,前提是如果它們將被包含到其他摘要中。 RSS 和 Atom 具有相似的基于 XML 的格式。它們的基本結(jié)構(gòu)是相同的,只在節(jié)點的表達(dá)式上有一點區(qū)別。在RSS 2.0 and Atom 1.0, Compared中,在內(nèi)容的比較上:
<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).
進(jìn)一步的:
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.
看起來,注重于兩者的區(qū)別,更多的是了解ATOM是對RSS2.0的改進(jìn)就可以了。
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的[转贴]ATOM和RSS的区别的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。