学无止境

-------至弱即为至强!

导航

RSS2.0规范(转)

Posted on 2007-01-18 12:01  赵国亮  阅读(765)  评论(0编辑  收藏  举报
必须的频道元素

Element

Description

Example

title

频道的名字,它是人们怎样查阅你的服务。如果你有html站点,在你的RSS文件中包含相同的内容

你的频道名字应该和你HTML站点的名字是一样的

Litteredhat家园

link

相应频道的HTML站点的url

http://littleredhat.go.nease.net

description       

描述频道的句子和短语

Littleredhat家园是一个关于常用软件应用,网络方面和J2EE的个人网站

     

      

 

       

 

 

 

 
可选频道元素

Element

Description

Example

language

频道被写使用的语言. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C.

en-us

zh-cn

copyright

频道内容的版权说明

Copyright 2004, littleredhat家园

managingEditor

编辑内容负责人的EMAIL地址

xybgsm@163.com

webMaster

网站管理员的EMAIL地址

xybgsm@163.com

pubDate

频道内容发布日期. For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred).

Sat, 07 Sep 2002 00:00:01 GMT

<pubDate>Tue, 31 Aug 2004 02:54:45 GMT</pubDate>

lastBuildDate

上次频道内容被改变的时间

The last time the content of the channel changed.

Sat, 07 Sep 2002 09:42:31 GMT

category

说明频道属于那个种类

Specify one or more categories that the channel belongs to. Follows the same rules as the <item>-level category element. More info.

<category>Newspapers</category>

generator

使程序发现频道的指示字符

A string indicating the program used to generate the channel.

MightyInHouse Content System v2.3

docs

在RSS文件使用的格式的说明文档的url

It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.

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 stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. More info here.

<ttl>60</ttl> 5

image

Specifies a GIF, JPEG or PNG image that can be displayed with the channel. More info here.

 

rating

The PICS rating for the channel.

 

textInput

Specifies a text input box that can be displayed with the channel. More info here.

 

skipHours

A hint for aggregators telling them which hours they can skip. More info here.

 

skipDays

A hint for aggregators telling them which days they can skip. More info here.

 

 <item>的子元素

Element

Description

Example

title

Item的题目

Venice Film Festival Tries to Quit Sinking

link

Item的连接

http://www.nytimes.com/2002/09/07/movies/07FEST.html

description     

Item的大纲

Some of the most heated chatter at the Venice Film Festival this week was about the way that the arrival of the stars at the Palazzo del Cinema was being staged.

author

Item作者的email 地址

More.

oprah@oxygen.net

category

Includes the item in one or more categories. More.

Simpsons Characters

comments

与item关联评论页的url

URL of a page for comments relating to the item. More.

http://www.myblog.org/cgi-local/mt/mt-comments.cgi?entry_id=290

enclosure

Describes a media object that is attached to the item. More.

 

guid

A string that uniquely identifies the item. More.

http://inessential.com/2002/09/01.php#a2

pubDate

Item发布时间 More.

<pubDate>Mon, 06 Sep 2004 11:31:15 GMT</pubDate>

source

The RSS channel that the item came from. More.

Quotes