菠萝三国

大江东去,浪淘尽...
随笔 - 34, 文章 - 47, 评论 - 22, 引用 - 0
数据加载中……

RSS的格式及解释(转)

 
2007年02月15日 星期四 06:04 P.M.


RSS2.0元素channel的子元素列表
元素 描述 值域 重要性 举例
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 h[url=file:///C:/Documents%20and%20Settings/Administrator/桌面/r<a%20href=]erere[/url]" target="_blank" class="keylink">ere.   可选 <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) 描述 值域 重要性 举例(Example)
url 图片的url   必备  
title 图片的标题,用于http的alt属性   必备  
link 网站的url(实际中常以频道的url代替)   必备  
width 图片的宽度(象素为单位) 最大144,默认88 可选  
height 图片的高度(象素为单位) 最大400,默认31 可选  
description 用于link的title属性   可选  


RSS2.0元素channel的子元素cloud的子元素列表

元素(Element) 描述 值域 重要性 举例(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) 描述 值域 重要性 举例(Example)
title Submit按钮的标签   必备  
description 解释text输入区   必备  
name Text area对象的名字   必备  
link 处理提交的请求的cgi程序   必备  

 

附格式:

<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[网站名]]></title>
        <image>
        <title>注释</title>
        <link>目标</link>
        <url>图片路径</url>
        </image>
<description><![CDATA[网站描述]]></description>
<link>网站网址</link>
<language>zh-cn(语言)</language>
<generator>生成本页的程序名</generator>
<ttl>页面在缓存在有效时间(分)</ttl>

<item>
<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html"></title>
<link></link>
<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">描述
  </description>
  
  <pubDate>发表时间</pubDate>
  
  <atom:published xmlns:atom="http://www.w3.org/2005/Atom">日期T时间Z</atom:published>
  
  <atom:updated xmlns:atom="http://www.w3.org/2005/Atom">日期T时间Z</atom:updated>
  
  <category>分类</category>
  
  <author>作者</author>
  
  <atom:author xmlns:atom="http://www.w3.org/2005/Atom">
  <atom:name>作者介绍之作者名</atom:name>
  </atom:author>
  <guid>文章路径</guid>
  <cfi:id>0</cfi:id>
  <cfi:read>true</cfi:read>
  <cfi:downloadurl>源的下载地址</cfi:downloadurl>
  <cfi:lastdownloadtime>源的最后更新时间2007-02-15T08:03:21.515Z</cfi:lastdownloadtime>
  </item>
  </channel>
</rss>

示例http://hi.baidu.com/eachcan/rss

posted on 2008-01-30 09:27 菠萝 阅读(2137) 评论(1)  编辑  收藏 所属分类: WEB

评论

# re: RSS的格式  回复  更多评论   

545
2011-07-14 12:18 | 24

只有注册用户登录后才能发表评论。


网站导航: