RSS is a web content syndication format.
Its name is the abbreviation of Really Simple Syndication.
RSS is a type of XML. All RSS documents follow the XML 1.0 specification, which is published on the W3C website.
At the beginning of an RSS document is a <rss> node and a specified attribute version, which specifies which version of RSS the document will be represented by. If the document is represented by this specification, its version attribute must be equal to 2.0.
One level below the <rss> node is an independent <channel> node, which contains information and content about the channel.
About this documentThis document was written in the fall of 2002, when RSS version was 2.0.1.
It contains all modifications and additions since the RSS 0.91 specification (2000), as well as new features included in RSS 0.92 (December 2000) and RSS 0.94 (August 2002).
Required channel node Below is a list of channel nodes that must be included, each with a brief description, an example, where it should appear, and a hyperlink to a more detailed description.| element | describe | example |
| title | Channel name. It tells others how to access your service. If you have an HTML website that matches the content of your RSS file, your title element value should be the same as your website's title. | GoUpstate.com News Headings |
| link | The URL of the website that responds to the channel | http://www.goupstate.com/ |
| description | Description about this channel | The latest news from GoUpstate.com, a Spartanburg Herald-Joural Web Site |
Below is a list of optional channel elements
| node | describe | example |
| language | language used. This allows the aggregator to group all Italian sites. | en-us |
| copyright | Copyright statement | Copyright 2002, Spartanburg Herald-Journal |
| managingEditor | Email of the content person in charge | [email protected] (George Matesky) |
| webMaster | Email from technician | [email protected] (Betty Guernsey) |
| pubDate | content release time | Sat, 07 Sep 2002 00:00:01 GMT |
| lastBuildDate | Last updated | Sat, 07 Sep 2002 09:42:31 GMT |
| category | Specify one or more categories to which this channel belongs. Follows the same rules as item-level category elements. | <category>Newspapers</category> |
| generator | The name of the program that generated the channel | MightyInHouse Content System v2.3 |
| docs | URL address pointing to RSS format document? | http://blogs.law.harvard.edu/tech/rss |
| cloud | Allows all processes to register with a cloud to get channel update notifications, and implements a lightweight publish-subscribe protocol for RSS feeds. | <cloud domain=rpc.sys.com port=80 path=/RPC2 registerProcedure=pingMe protocol=soap/> |
| ttl | ttl is the abbreviation of Time to live. It indicates the effective retention time of the cache. | <ttl>60</ttl> |
| image | The image address displayed with the channel | |
| rating | The statistical image address of the channel | |
| textInput | Specify a textbox to display with the channel | |
| skipHours | Tell the user which time periods can be ignored | |
| skipDays | Tell users which days can be ignored |
<image> is an optional <channel> child node that contains three required child elements and three optional child elements.
<url> is the URL address of a GIF, JPEG or PNG image file that represents the entire channel
<title> is used to describe the above image, which is equivalent to the alt attribute of <img> in HTML language.
<link> is the url of the site to connect to, and when the channel is displayed, the image's link points to this site.
<title> and <link> should have the same values as the channel's <title> and <link>
Optional nodes include <width> and <height>, which are numeric types that specify the width and height of the image, in pixels.
<description> is the text in the TITLE attribute of the link, which will be displayed when the web page is called.
The maximum value for image width is 144, and the default value is 88
The maximum value for image height is 400, and the default value is 31
<channel>child node<cloud><cloud> is an optional <channel> child node.
It specifies a web service that can support the rssCloud interface, which can be implemented using HTTP-POST, XML-RPC or SOAP1.1.
Its purpose is to allow notifications of process channels registered as cloud to be updated, thereby implementing a lightweight publish-subscribe protocol.
<clouddomain=rpc.sys.comport=80path=/RPC2registerProcedure=myCloud.rssPleaseNotifyprotocol=xml-rpc/>In this example, to request channel notifications, you need to send an XML-RPC message to port 80 of rpc.sys.com , the path is /RPC2. The called process is myCloud.rssPleaseNotify.
<channel>child node<ttl><ttl> is an optional <channel> child node.
ttl is the abbreviation of time to live. It indicates how long the channel should be cached before being flushed. This allows RSS feeds to be managed by a network that supports file sharing, such as Gnutella
For example: <ttl>60</ttl>
<channel>child node<textInput>
<textInput> is an optional child node of <channel>, and <textInput> contains four child nodes.<title>--The label of the submit button
<description>--Description of the text input area
<name>--The name of the text input area
<link>--The URL of the CGI script that handles text input
The purpose of using <textInput> is somewhat mysterious(?). You can use it to provide a search engine input box or allow readers to provide feedback. Many aggregators ignore this node.
Node of <item>A channel can contain many item nodes. An item can represent a story - say, a story in a newspaper or magazine. If so, the item's description is a summary of the story, and the item's link points to where the entire story is stored. All project nodes are optional, but must contain at least a title and description.
| node | describe | example |
| title | item title | Venice Film Festival Tries to Quit Sinking |
| link | item URL | http://www.nytimes.com/2002/09/07/movies/07FEST.html |
| description | item summary | 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 | Author's email address | [email protected] |
| category | Items can be included in one or more categories | Simpsons Characters |
| comments | The address of the comment related to the item | http://www.myblog.org/cgi-local/mt/mt-comments.cgi?entry_id=290 |
| enclosure | additional media objects | |
| guide | A string that uniquely identifies the item | http://inessential.com/2002/09/01.php#a2 |
| pubDate | The time the item was released | Sun, 19 May 2002 15:21:36 GMT |
| source | rss channel source | Quotes of the Day |
<source> is an optional node for <item>.
Its value is the name of the RSS channel the item comes from, derived from the item's title. It has a must-contain attribute url, which links to the XML serialization source.
<sourceurl=http://static.userland.com/tomalak/links2.xml>Tomalak'sRealm</source>The role of this node is to increase the reputation of the link and further promote the source of the news item. It can be used in the aggregator's Post command. When accessing an item from the aggregator through a webblog, a <source> can be automatically generated.
<item>Child node<enclosure> <enclosure> is an optional node for <item>.It has three necessary properties. The url attribute indicates the location of the enclosure, the length indicates its size in bytes, and the type attribute indicates its standard MIME type.
The url must be an http url.
<enclosureurl=http://www.scripting.com/mp3s/weatherReportSuite.mp3length=12216320type=audio/mpeg/>
<item>Child node<category> <category> is an optional node for <item>.It has an optional attribute or field, which is a string that defines the taxonomy.
The value of this node is a forward slash-separated string that identifies a hierarchic location within the specified taxonomy. The processor may establish a session for identification of categories. (Processors may establish conventions for the interpretation of categories) Here are two examples:
<category>GratefulDead</category>
<categorydomain=http://www.fool.com/cusips>MSFT</category> You can include as many category nodes for different domains as you need, and you can have a back-and-forth reference in different parts of the same domain item.
<item>Child node<pubDate> <pubDate> is an optional node for <item>.Its value is the date the item was published. If it is a date that has not yet arrived, the aggregator can choose not to display the item until the date arrives.
<pubDate>Sun,19May200215:21:36GMT</pubDate> <item>Child node<guid>
<guid> is an optional node for <item>.
guid is the abbreviation of globally unique identifier. It is a string that uniquely identifies the item. When an item is published, the aggregator can optionally use this string to determine whether the item is new.
<guid>http://some.server.com/weblogItem3207</guid>
There are no specific syntax rules for guids; the aggregator must treat them as a string. Generates a unique string GUID depending on the source of the seed.
If the guid node has an isPermaLink attribute and the value is true, the reader will think that it is the permalink of the item. A permalink is a url link that can be opened in a web browser and points to all items described by the <item> node.
<guid isPermaLink=true>http://inessential.com/2002/09/01.php#a2</guid>
isPermaLink is an optional attribute and the default value is true. If the value is false, the GUID will not be considered a URL or a URL pointing to any object.
<item>Child node<comment> <comment> is an optional node for <item>.If present, it points to the url of the item's review
<comments>http://rateyourmusic.com/yaccs/commentsn/blogId=705245&itemId=271</comments>
<item>child node<author> <author> is an optional node for <item>.It is the email of the author of the item. For newspapers and magazines distributed through RSS, the author may be the person who wrote the article described by the item. For aggregated webblogs, the author may not be the editor or webmaster. For personally maintained webblogs, it makes sense to ignore the <author> node.
<author>[email protected] (Lawyer Boyer)</author>