英文原版請參見http://blogs.law.harvard.edu/tech/rss
RSS是 Really Simple Syndication的縮寫(對rss2.0而言,是這三個詞的縮寫,對rss1.0而言則是RDF Site Summary的縮寫,1.0與2.0走的是兩個體系)
RSS 基於XML,所有的 RSS 必須遵循w3c網站上公布的XML 1.0 規範。
在一個RSS文檔中,根項目是<rss>,帶有一個必備屬性version,用以指明該文檔遵循的rss規範,如果rss文檔遵循本規範,則version值必須是2.0。
<rss>元素只有一個子項目,包含關於頻道的一些資訊。頻道(channel)是整個blog,項(item)指一篇文章或日誌(也有稱這為post)。
RSS2.0元素channel的子項目列表
| 元素(Element) |
描述(Description) |
範圍 |
重要性 |
舉例(Example) |
| title |
頻道名稱 |
|
必備 |
GoUpstate.com News Headlines |
| link |
頻道的URL |
|
必備 |
http://www.goupstate.com/ |
| Description |
頻道的描述 |
|
必備 |
The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site. |
|
|
|
|
|
| language |
頻道文章所用語言, |
可用netscape或w3c推薦的列表 |
可選 |
en-us |
| copyright |
頻道內容的著作權說明 |
|
可選 |
Copyright 2002, Spartanburg Herald-Journal |
| managingEditor |
責任編輯的email |
|
可選 |
geo@herald.com (George Matesky) |
| webMaster |
負責頻道技術事務的網站管理員email |
|
可選 |
betty@herald.com (Betty Guernsey) |
| pubDate |
頻道內容發布日期,格式遵循RFC822格式(年份可為2們或4位) |
|
可選 |
Sat, 07 Sep 2002 00:00:01 GMT |
| lastBuildDate |
頻道內容最後的修改日期 |
|
可選 |
Sat, 07 Sep 2002 09:42:31 GMT |
| category |
指定頻道所屬的一個或幾個類別 |
|
可選 |
<category>Newspapers</category> |
| generator |
產生該頻道的程式名 |
|
可選 |
MightyInHouse Content System v2.3 |
| docs |
指向該RSS檔案所用格式說明的URL |
|
可選 |
http://blogs.law.harvard.edu/tech/rss |
| cloud |
Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. More info here. |
|
可選 |
<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/> |
| ttl |
有效期間,用以指明該頻道可被緩衝的最長時間 |
分鐘為單位 |
可選 |
<ttl>60</ttl> |
| image |
指定一個 GIF或JPEG或PNG圖片,用以與頻道一起顯示 |
|
可選 |
|
| rating |
這個頻道的分級(主要指成人、限制、兒童等) |
|
可選 |
|
| textInput |
指定一個text輸入框供使用者輸入,具體資訊及功能未定。 |
|
可選 |
|
| skipHours |
提示新聞彙總器,那些小時時段它可以跳過。 |
|
可選 |
|
| skipDays |
提示新聞彙總器,那些天它可以跳過。 |
|
可選 |
|
RSS2.0元素channel的子項目image的子項目列表
| 元素(Element) |
描述(Description) |
範圍 |
重要性 |
舉例(Example) |
| url |
圖片的url |
|
必備 |
|
| title |
圖片的標題,用於http的alt屬性 |
|
必備 |
|
| link |
網站的url(實際中常以頻道的url代替) |
|
必備 |
|
| width |
圖片的寬度(象素為單位) |
最大144,預設88 |
可選 |
|
| height |
圖片的高度(象素為單位) |
最大400,預設31 |
可選 |
|
| description |
用於link的title屬性 |
|
可選 |
|
RSS2.0元素channel的子項目cloud的子項目列表
| 元素(Element) |
描述(Description) |
範圍 |
重要性 |
舉例(Example) |
| domain |
Cloud程式所在機器的網域名稱或IP地址 |
|
|
radio.xmlstoragesystem.com |
| port |
訪問clound程式所通過的連接埠 |
|
|
80 |
| path |
程式所在路徑(不一定是真實路徑) |
|
|
/RPC2 |
| registerProcedure |
註冊的可提供的服務或過程 |
|
|
xmlStorageSystem.rssPleaseNotify |
| protocol |
協議 |
xml-rpc, soap , http-post 之一 |
|
xml-rpc |
RSS2.0元素channel的子項目textInput的子項目列表
| 元素(Element) |
描述(Description) |
範圍 |
重要性 |
舉例(Example) |
| title |
Submit按鈕的標籤 |
|
必備 |
|
| description |
解釋text輸入區 |
|
必備 |
|
| name |
Text area對象的名字 |
|
必備 |
|
| link |
處理提交的請求的cgi程式 |
|
必備 |
|