Professional Documents
Culture Documents
Introduction to RSS
RSS is a method that uses XML to distribute web content on one web site, to many other web sites.
RSS allows fast browsing for news and updates.
What is RSS?
RSS stands for Really Simple Syndication
RSS allows you to syndicate your site content
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
History of RSS
RSS has been released in many different versions.
1
2003 - The official RSS 2.0 specification is released
RSS Syntax
The syntax rules of RSS 2.0 are very simple and very strict. The rules are very easy to learn, and very easy
to use.
Tip: Read our RSS Publishing chapter to view free RSS aggregation services.
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.
The next line is the RSS declaration which identifies that this is an RSS document (in this case, RSS version
2.0).
2
The next line contains the <channel> element. This element is used to describe the RSS feed.
The <channel> element has three required child elements:
<title> - Defines the title of the channel (e.g. W3Schools Home Page)
<link> - Defines the hyperlink to the channel (e.g. http://www.w3schools.com)
<description> - Describes the channel (e.g. Free web building tutorials)
Each <channel> element can have one or more <item> elements.
Each <item> element defines an article or "story" in the RSS feed.
The <item> element has three required child elements:
<title> - Defines the title of the item (e.g. RSS Tutorial)
<link> - Defines the hyperlink to the item (e.g. http://www.w3schools.com/rss)
<description> - Describes the item (e.g. New RSS tutorial on W3Schools)
Finally, the two last lines close the <channel> and <rss> elements.
Comments in RSS
The syntax for writing comments in RSS is similar to that of HTML:
<!-- This is an RSS comment -->
As mentioned before, the <channel> element describes the RSS feed, and has three required child
elements:
<title> - Defines the title of the channel (e.g. W3Schools Home Page)
<link> - Defines the hyperlink to the channel (e.g. http://www.w3schools.com)
<description> - Describes the channel (e.g. Free web building tutorials)
The <channel> element usually contains one or more <item> elements. Each <item> element defines an
article or "story" in the RSS feed.
Furthermore, there are several optional child elements of <channel>. We will explain the most important
ones below.
3
The copyright for the RSS document above could be:<copyright>2006 Refsnes Data as. All rights
reserved.</copyright>
4
Each <item> element defines an article or "story" in the RSS feed.
As mentioned before, each <item> element defines an article or "story" in the RSS feed.
The <item> element has three required child elements:
<title> - Defines the title of the item (e.g. RSS Tutorial)
<link> - Defines the hyperlink to the item (e.g. http://www.w3schools.com/rss)
<description> - Describes the item (e.g. New RSS tutorial on W3Schools)
Furthermore, there are several optional child elements of <item>. We will explain the most important ones
below.
5
Get Your RSS Feed Up On The Web
Now it's time to get your RSS file up on the web. Here are the steps:
1. Name your RSS file. Notice that the file must have an .xml extension.
2. Validate your RSS file (a good validator can be found at http://www.feedvalidator.org).
3. Upload the RSS file to your web directory on your web server.
4. Copy the little orange or button to your web directory.
5. Put the little orange "RSS" or "XML" button on the page where you will offer RSS to the world (e.g. on
your home page). Then add a link to the button that links to the RSS file. The code will look something like
this:
<a href="www.w3schools.com/rss/myfirstrss.xml">
< img src="www.w3schools.com/rss/rss.gif" width="36" height="14">
</a>.
6. Submit your RSS feed to the RSS Feed Directories (you can Google or Yahoo for "RSS Feed
Directories"). Note! The URL to your feed is not your home page, it is the URL to your feed, like
"http://www.w3schools.com/rss/myfirstrss.xml". Here are some free RSS aggregation services:
Syndic8: Over 300,000 feeds listed. Register your feed here.
Daypop: Over 50,000 feeds. Register your feed here.
Newsisfree: Over 18,000 feeds. Register your feed here.
7. Register your feed with the major search engines:
Yahoo - http://publisher.yahoo.com/rss_guide/submit.php
Google - http://www.google.com/ig (this is the Google personalized homepage. However, Google will index
any RSS feed added here)
MSN - http://w.moreover.com/site/products/ind/pingserver.html (MSN search uses the Moreover news
database)
8. Update your feed - Now you have registered your RSS feed with Google, Yahoo, and MSN. Now you
must make sure that you update your content frequently and that your RSS feed is constantly available.
Automated RSS
If you don't want to update your RSS feed yourself, there are tools and services that can do it automatically
for you, such as:
MyRSSCreator - offers an automated, reliable RSS service in just 10 minutes
FeedFire - offers free creation and distribution of RSS feeds
For users who only need an RSS feed for their personal website, some of the most popular blog (Web Log)
managers that offer built-in RSS services are:
Blogger
Radio
RSS Readers
An RSS Reader is used to read RSS Feeds!
RSS readers are available for many different devices and OS.
RSS Readers
There are a lot of different RSS readers. Some work as web services, and some are limited to windows (or
Mac, PDA or UNIX). Here are a few I have tried and liked:
NewsGator Online - A free online RSS reader. Includes synchronization with Outlook, viewing TV content
with Media Center Edition, and publication of blogs and headlines.
RssReader - A free Windows-based RSS reader. Supports RSS versions 0.9x, 1.0 and 2.0 and Atom 0.1,
0.2 and 0.3.
FeedDemon - A Windows-based RSS reader. Very easy to use and has a very orderly interface. However,
this is not freeware!
blogbot - An RSS reader plug-in for Outlook or Internet Explorer. The light-version for Internet Explorer is
free.
6
Tip: The Mozilla Firefox browser has a built-in RSS Reader. If you go to a web site that offers RSS feeds,
you will see the Firefox RSS icon in the address bar. Click on the icon to view a list of the different feeds.
Choose the feed you want to read.
RSS Examples
These examples demonstrate RSS using our RSS reader to view the results.
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
Result:
W3Schools Home Page
Free web building tutorials
Category: IT/Internet/Web development
RSS Version: 2.0
RSS Tutorial: New RSS tutorial on W3Schools
Category: News/Tutorial
7
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<generator>Notepad</generator>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
</item>
</channel>
</rss>
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
Created with: Notepad
RSS Tutorial: New RSS tutorial on W3Schools
Result:
8
</rss>
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
Language: en-us
RSS Tutorial: New RSS tutorial on W3Schools
Result:
*Redirected to a search engine like google when you type a query
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
Skip Days: Saturday Sunday
9
RSS Tutorial: New RSS tutorial on W3Schools
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
RSS Tutorial: New RSS tutorial on W3Schools
XML Tutorial: New XML tutorial on W3Schools
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
RSS Tutorial: New RSS tutorial on W3Schools
Comments.
10
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
<enclosure url="http://www.w3schools.com/media/3d.wmv"
length="78645" type="video/wmv" />
</item>
</channel>
</rss>
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
RSS Tutorial: New RSS tutorial on W3Schools
Identifier: http://www.w3schools.com/rss/item0768
Result:
11
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
RSS Tutorial: New RSS tutorial on W3Schools
Published: Thu, 27 Apr 2006
Result:
W3Schools Home Page
Free web building tutorials
RSS Version: 2.0
RSS Tutorial: New RSS tutorial on W3Schools
Source: W3Schools.com
RSS Reference
RSS <channel> Element
The links in the "Element" column point to more information about each specific element.
Element Description
<docs> Optional. Specifies an URL to the documentation of the format used in the
feed
<generator> Optional. Specifies the program used to generate the feed
<lastBuildDate> Optional. Defines the last-modified date of the content of the feed
<managingEditor> Optional. Defines the e-mail address to the editor of the content of the feed
<pubDate> Optional. Defines the last publication date for the content of the feed
12
<skipDays> Optional. Specifies the days where aggregators should skip updating the
feed
<skipHours> Optional. Specifies the hours where aggregators should skip updating the
feed
<textInput> Optional. Specifies a text input field that should be displayed with the feed
<ttl> Optional. Specifies the number of minutes the feed can stay cached before
refreshing it from the source
<webMaster> Optional. Defines the e-mail address to the webmaster of the feed
<author> Optional. Specifies the e-mail address to the author of the item
By: DataIntegratedEntity22592
Source: http://w3schools.com/rss/default.asp
13