WEB2.0我们面对太多有关BLOG、SNS的东西,这中间有个重要的概念是我们需要明白的,那就是RSS聚会,收集了一些入门的资料。本文翻译自W3C官方资料 Linyupark @ W3Schools


RSS was designed to share data like headlines, links and short descriptions of these.
RSS 将数据分成像标题,连接和简单描述的形式。(浓缩过的信息)

RSS allows fast browsing for news and updates.


What You Should Already Know
Before you continue you should have a basic understanding of the following:

XML / XML 命名空间
If you want to study these subjects first, find the tutorials on our Home page.


What is RSS?
RSS stands for Really Simple Syndication
RSS就是 Really Simple Syndication (真正的简单聚合)
RSS allows you to syndicate your site content
RSS is a selected list of defined items on a site
RSS defines an easy way to share and view headlines and content
RSS files can be automatically updated
RSS allows personalized views for different sites
RSS is written in XML


Why Use RSS?
RSS was designed to show selected data.
RSS 能展示被选择的数据(针对性)

Without RSS, users will have to check your site daily to check for new updates. This may be too time-consuming for many users. With an RSS feed (RSS is often called a News Feed or RSS Feed) they can check your site faster using an RSS aggregator (a site or program that gathers and sorts out several RSS feeds).
没有RSS的话,用户将必须每天到你的站上看看有没更新内容。这对于一些用户来说是很浪费时间的。通过一个RSS feed他们可以使用RSS阅读器更快的查看你的站是否有更新。

Since RSS data is small and fast-loading, it can easily be used with services like cell phones or PDA’s.

Web-rings with similar information can easily share data on their sites to make them better and more useful.


Who Should Use RSS?
Webmasters who seldom update their sites do not need RSS.

RSS can be useful for Web sites that are updated frequently, like:

News sites – Lists news with title, date and descriptions
Site changes – Lists changed pages or new pages
Companies – Lists news and new products
公司站 – 新闻 和 新产品
Calendars – Lists upcoming events and important days


The Future of RSS
RSS is going to be everywhere.

Thousands of sites use RSS and more people understand its usefulness every day.

By using RSS, information on the Web becomes easier to find and web developers can spread their information more easily to special interest groups.

Hopefully, future RSS versions will include additional fields that will make it even easier to categorize and share.


RSS has been released in many different versions.


The History of RSS
Here is the history of RSS according to Dave Winer (key developer of most of the RSS formats):
依据Dave Winer(RSS开发的关键人物)的描述,RSS有这样的历史:

Dec. 1997 – Dave Winer developed scriptingNews
1997年12月 Dave Winer 开发了新闻脚本

Mar. 1999 – RSS 0.90 was developed by Netscape, which supported the scriptingNews format. This was simply XML with a RDF Header
1999年三月 – RSS 0.90 由网景公司开发,支持格式化新闻脚本.

Jun. 1999 – scriptingNews 2.0b1 was developed by Dave Winer at UserLand. This included Netscape’s RSS 0.90 features
新闻脚本2.0b1于 1999年6月由Dave Winer开发,包含了网景RSS 0.90的特点

Jul. 1999 – RSS 0.91 was an attempt by Netscape to move towards a more standard format and included most features from scriptingNews 2.0b1 but they removed the RDF header

Jul. 1999 – UserLand uses RSS 0.91 and gets rid of scriptingNews

Netscape discontinues their RSS development

Jun. 2000 – Official RSS 0.91 specification release from UserLand

Aug. 2000 – RSS 1.0 developed by a group lead by Rael Dornfest at O’Reilly. This format uses RDF and namespaces. Because of its name it is often confused as being a new version of 0.91, but this is a completely new format with no ties to RSS 0.91

Dec. 2000 – RSS 0.92 developed by Dave Winer at UserLand and includes optional elements

Sep. 2002 – RSS 2.0 is designed by Dave Winer after leaving Userland

Jul. 2003 – RSS 2.0 specification released through Harvard under a Creative Commons license


What Are The differences?
Unlike the other RSS formats, RSS 1.0 was developed using the W3C RDF (Resource Description Framework) standard.

The idea behind RDF is to help create a Semantic Web. Read more about RDF and Semantic Web here. This does not matter too much for ordinary users, but is used towards the goal for a web standard that will make it easier for persons and applications to exchange data.


What RSS Version Should I Use?
RSS 0.91 and RSS 2.0 are easiest to understand. RSS 1.0 is more complex to learn and takes more time and bandwidth to process.

Our tutorial is based on RSS 2.0.


Is There an RSS Web Standard?
有RSS WEB标准吗?
There is no official standard for RSS. But about 50 % of all RSS feeds use the RSS 0.91 format. About 25 % use the RSS 1.0 format and the last 25 % is split between the other RSS 0.9x versions and RSS 2.0.
没有针对RSS的官方标准。但在所有的RSS feeds中大约有50% 使用RSS 0.91规格.25%使用RSS1.0规格并且至少有25%使用 RSS 0.9x 版本和 RSS 2.0之间。


The syntax rules of RSS 2.0 are very simple and very strict.

This tutorial teaches how to create your own RSS feed and maintain it.
这个教程会教你如何建立你自己的RSS feed并维护它。


An Example RSS document
RSS documents use a self-describing and simple syntax.

[coolcode lang=”xml”]

W3Schools W3Schools Web Tutorials
RSS Tutorial Check out the RSS tutorial

The first line in the document – the XML declaration – defines the XML version and the character encoding used in the document. In this case the document conforms to the 1.0 specification of XML and uses the ISO-8859-1 (Latin-1/West European) character set.
文档内的第一行为XML声明-定义了XML的版本和文档使用的字符编码。这个例子里文档使用的是XML1.0版本,编码为 ISO-8859-1.

The next line describes the RSS element of the document (like it was saying: “this is an RSS document – version 2.0”):

The next line describes the element of the document:

The next three lines describe three child elements of the element (, <link> and <description>):<br /> 接下来的三行描述了<channel>的三个子元素(<title>,<link>,<description>)</p> <p><title>W3Schools W3Schools Web Tutorials
Then there is an element. The element contains the information you would like your RSS feed to show (, <link> and <description>). You can add multiple <item> elements:<br /> 然后就是<item>元素,<item>元素包含了RSS展示的一些信息(<title>, <link> 和 <description>)你可以添加数个<item>元素:</p> <p><item><br /> <title>RSS Tutorial Check out the RSS tutorial

Finally, the two last lines close the and elements:
最后的两行关闭 元素:

Did you understand that this was an RSS feed from W3Schools? Don’t you agree that RSS is pretty self-descriptive?


RSS is an XML Dialect
RSS 是一种XML的方言
Because RSS is XML, there are a couple of things you must remember.

All XML elements must have a closing tag
XML tags are case sensitive
All XML elements must be properly nested
Attribute values must always be quoted


Comments in RSS
The syntax for writing comments in RSS is similar to that of HTML:


还有一些和RSS Channel、RSS Item、发布、阅读器相关的资料不在此处说明。

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image