RSS Usage Specification _xml/rss

Source: Internet
Author: User
Tags generator

English Original:
Http://blogs.law.harvard.edu/tech/rss
The Chinese explanation on IBM:
Http://www-900.ibm.com/developerWorks/cn/xml/x-rss20/index.shtml
RSS 2.0 Overview
RSS is an XML dialect used to chain WEB content and metadata. RSS 0.91 is the most commonly used version of several available versions. A better approach to the new RSS feed is to use version 2.0, because this is the current specification and, as mentioned earlier, it is backward compatible with 0.91.
Dave Winer has written the specification of version 2.0. The modification of the specification may become difficult to use, or damage an existing application, and he deliberately avoids this situation. Winer summed up his thought: "Keep it simple." This is the value of RSS. Anyone who has a little knowledge of HTML can understand RSS. This is extremely important! ”
The specification is published under the Creative Commons license (see Resources). This means that you can reproduce and distribute the specification free of charge, carry out derivative work, and be free to work in business. An Advisory committee is responsible for updating specifications, promoting specifications and writing documentation.
RSS file Form
The RSS file consists of a <channel> element and its child elements. In addition to the channel content itself,,</channel><channel> includes elements that represent channel metadata, such as <title>, <link>, and <description>. Items are usually the main part of a channel and contain frequently changing content.
Channel
Channels typically have three elements that provide information about the channel itself:
<title&gt: The name of the channel or feed.
<link&gt: The URL of the Web site or site zone associated with the channel.
<description&gt: A brief description of what the channel does.
Many of the channel child elements are optional. The commonly used <image> elements contain three required child elements:
<url&gt: The URL that represents the GIF, JPEG, or PNG image for the channel.
<title&gt: Description of the image. Used as an ALT attribute for HTML <image> tags when the channel is rendered in HTML.
<link&gt: URL of the site. If the channel is rendered in HTML, the image is used as a link to this site.
<image> also has three optional child elements:
<width&gt: A number that represents the pixel width of the image, with a maximum value of 188 and a default value of 88.
<description&gt: Contains text that, when rendered, can be used as the title attribute of the link element that is formed around the image.
There are also many other optional channel elements that can be used. Most of them are self-evident:
<language>:en-us
<copyright>:copyright 2003, James Lewin
<managingeditor>:dan@spam_me.com (Dan DeleteKey)
<webmaster>:dan@spam_me.com (Dan DeleteKey)
<pubdate>:sat, Nov 2003 0:00:01 GMT
<lastbuilddate>:sat, Nov 2003 0:00:01 GMT
<category>:ebusiness
<generator>:your CMS 2.0
<docs>:http://blogs.law.harvard.edu/tech/rss
&LT;CLOUD&GT: Allows a process to register as "cloud", notifies it when the channel is updated, and implements a lightweight publish-subscribe protocol for the RSS feed.
<ttl&gt: Survival time is a number that represents the number of minutes a feed is buffered before it is refreshed.
&LT;RATING&GT: A PICS evaluation of the channel.
&LT;TEXTINPUT&GT: Defines an input box that can be displayed with the channel.
<skiphours&gt: Tells the collector which hours of updates can be ignored.
<skipdays&gt: Tell the collector that the day's update can be ignored.
Item
Items are usually the most important part of the feed. Each item can be a record of a weblog, full document, movie review, classified ad, or any content that you want to link to the channel. Other elements in the channel may not change, but the items are often changed.
You can have any number of items. The previous specification limit is 15 items, which is still a good upper limit if you want to keep backwards compatibility.
Elements of a news item
Each item typically contains three elements:
<title&gt: This is the name of the item, which is converted to the title in the HTML in the standard application.
<link&gt: This is the URL of the item. Title usually serves as a link to the URL contained in the </link><link> element.
<description&gt: Usually as a summary or supplement to the URL pointed to in link.
All elements are optional, but an item contains at least one <title&gt, or one <description>.
There are some other optional elements of the item:
<author&gt: The author's e-mail address.
&LT;CATEGORY&GT: Support for organized records.
<comments&gt: The URL of the comment page for the item.
&LT;ENCLOSURE&GT: Supports media objects related to this item.
<guid&gt: The only permanent link that is associated with the item.
&LT;PUBDATE&GT: When the item was released.
<source&gt: This entry is from which RSS channel, which is useful when aggregating items together.


RSS 2.0 Specification
Channel part
Title channel name must be
The URL of the link channel must be
The description of the Description channel must be
Language channel articles are available in the language of choice
Copyright Note optional
Managingeditor Manager's Email optional
Webmaster Webmaster Email Optional
pubdate Channel Release date optional (note time must be strictly compliant with RFC-822)
Lastbuilddate Channel last Modified date optional
Category Channel category optional
Generator The program name to generate the channel is optional
Docs The URL of the RSS file is optional
TTL Expiration is optional
Image channel icon Optional
Rating Channel level optional
Skiphours can be skipped hours optional
Skipdays can be skipped days optional
Item section
Title headings must be
Link This article's links must
Description described or referred to as abstracts must be
Author author's email optional
Category The classification of the article is optional
Comments the link to this article comment is optional
Enclosure the files included with this article are optional
GUID This article unique identification mark (currently no specification, generally use the article link representation) optional
pubdate Publication Time Optional
Source article origin link optional
Example:

Copy Code code as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<rss version= "2.0" >
<channel>
&LT;TITLE&GT;D.C life</title>
<link>http://blog.it580.com/</link>
<description>david && Cindy | | Xiami &&XlAMl.</description>
<language>zh-cn</language>
<pubdate>tue, June 2003 04:00:00 gmt</pubdate>
<lastbuilddate>tue, June 2003 09:41:01 gmt</lastbuilddate>
<generator>xiami edit</generator>
<managingeditor>editor@name.com</managingeditor>
<webmaster>webmaster@name.com</webmaster>
<item>
<title> Example File </title>
<link>
http://blog.it580.com/Sample_files.php
</link>
<description>
This is an example file
</description>
<pubdate>tue June 2003 09:39:21 gmt</pubdate>
<guid>
http://blog.it580.com/Sample_files.php
</guid>
</item>
</channel>
</rss>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.