Home

About Us

Submit a Site

Articles

Contact Us

 
 
Premier Web Directory - Human Edited Web Directory - Add your website free PREMIER DIRECTORY's ARTICLE SECTION
Submit Articles for Search Engine Exposure
 
Premier Web Directory - Human Edited Web Directory - Add your website free
Premier Directory's Article section was created for bringing writers and publishers together. Submit your articles for search engine exposure. Add an article or browse the articles already listed.
 
RSS - Really Simple Syndication
- By D.G. Sureau
 

What is RSS?

It is a format to share data, defined in Xml 1.0 version. You can deliver information in this format et one can get this and other information from various sources, in this format. Information provided by a Web site in a xml file is called a rss feed. Some new browsers can read directly Rss files, but a rss reader or aggregator may be used too.

RSS, History

Created by Netscape in 1999. First version is 0.90. The 0.91 version has been improved by the Userland company in 2000. In 2000 the version 1.0 based on RDF is created and named RDF Site Summary, it comes from O'Reilly and is not related to other versions. RSS 2.0 was defined by Dave Winer (previously worker at Userland) at Harvard University in 2002.

Another version is acronym of Rich Site Summary.

This page is based on the 2.01 specification from Harvard.

Why to use RSS?

To get information or news provided by Web sites in a format computers can process. To display it on a website or to read it yourself.
And for the provider of the content, this allows it to let known news on its site.

RSS, how it works?

The Rss system to publish articles and news over the web is very simple:

  1. There are just simple web pages, one want to be displayed by other websites.
    This set of pages is the rss feed.
  2. A xml file that defines the rss feed. This file holds URL, title and summary of each page to display.
  3. A person which want to read the feed on its computer. He (she) uses a rss reader and just adds the feed with the command of the program.
  4. Or another website that want to display the feed. It has to load the Rss file from the provider, to extract URL of pages, and display titles and summaries. This may be performed by a php script.
  5. When someone visits the website of the receiver, the scripts is launched, it recalls the rss file from the provider website and displays a list of news from extracted data.
  6. By a click on a line of the list, visitors display a page of the provider.

Structure of a RSS document

It is a Xml file and the global container is a "rss" tag.
The file holds one chanel at least, this is the website that provides the information.
The chanel provides some articles or data. These are web pages from the same or other websites.

How to use RSS?

1 - Using rss on a desktop

A Rss reader (or aggregator) must be installed first, compatible with your operating system (Windows, Linux, Mac OS, etc...). See in resources. There is one that is built with XUL.
Accessing the content depends upon the reader. This may accomplished just by a click on a "add" button to get the URL of the rss feed, and let it added to a list of feeds.

2 - Using a feed on a website

The Rss feed is displayed as a list of titles (and optionally summaries). A click on a title displays the new. Titles are updated automatically. A script in Php or other language, builds the list each time the page is displayed by loading the Rss file and extracting the data from it.

How to publish news in a RSS feed?

There are several means to generate Rss feeds.

  • Using the rss library of php. A php script will build the xml file from titles and descriptions of pages for from the content of a page.
  • Use a specialized tool to extract the data from a page.
To give acces to the xml file, a link is displayed:XML Feed

<a type="application/rss+xml" href="feed.rss"> RSS feed for this site</a>


Feeds in Atom format use the "application/atom+xml" value instead.

Vocabulary

  • Feed It is a set of "item" tags, a set of infos or news.
  • Portal A web page that displays a Rss feed.
  • Syndicated published through a Rss feed.
  • Syndication publishing data by Rss feeds.

Main Rss tags

RSS The global container.
Channel A distributing chanel. It has several descriptive tags and holds one or several items.


<rss version="2.0">
<channel>
    
</channel>
</rss>

Required tag for the channel

  • title The title of the channel. Should contains the name.
  • link URL of the website that provides this channel.
  • description Summary of what the provider is.
  • one item tag at least, for the content.

<rss version="2.0">
<channel>
    <title>Premier Directory </title>     
    <link>http://www.premierdirectory.org/</link>
    <description></description>
    <item>
    </item>    
</channel>
</rss>

Optional tags for the channel

  • language The human language used for the text.
  • docs Where to find the doc for the format of the file, may be Harvard.
  • webmaster E-mail.
  • pubDate Publishing date.
  • etc... See in the specification for more.

Articles of the channel

Each item tag must hold these tags:

  • title Title of the article.
  • link The URL of the page.
  • description Summary of the article.

    <item>
        <title>ROR XML Feed</title>         
        <link>http://www.premierdirectory.org/rormap.html</link>
        <description>... some text... </description>
    </item>
  

And some optional info for this article

  • pubDate Publishing date.
  • guid A string of character that is unique to designate this item.
  • category The category of the article.
  • etc...

Building its personal Rss feed, step by step

At start, this is just a simple text file, created with any text editor. But a Xml editor is more convenient. (see at the "software" page). The name may be, for example: "feed.xml".
The overall structure is as that:


<?xml version="1.0"?>
<rss version="2.0">
  <channel>
   
  </channel>
</rss>

1) Defining the source, by the channel tag

The channel will be the same for all your rss feeds. These tags are required:
- title: the title of your website, may be the one in the title tag of the home page.
- link: the URL of your website: example: http://www.premierdirectory.org
- description: description of your website, about 200 characters, this may be the text assigned to the content attribute of the description tag, in the head section of the home page.

  <channel>
    <title>Premier Directory </title>
    <link>http://www.premierdirectory.org/</link>
    <description>Free Web Directory, etc...</description>
  </channel>

2) Addind an image

This is optional. Design a small image (64x64 for example) in a common format (gif, jpg, png) and put in into the same directory that the rss file.
The "image" tag is a sub-element of the channel tag
- url is the address of the image itself.
- link is the adress of the page displayed when one clicks on the image.

 <channel>
    <title> </title>
    <link> </link> 
    <image>
        <url>http://www.premierdirectory.org/images/logo_head.jpg</url>
        <link>http://www.premierdirectory.org/feed.xml</link>
    </image>
 </channel>

3) Adding a new

Now, we will add a web page to display an information. This is an "item" tag, a sub-element of channel, and this components are required:
- title: the title of the article.
- link: the URL of the page.
- description: a summary of the article, about 200 characters
.

<item>
    <title>News of today</title>
    <link>http://www.premierdirectory.org/feed.xml</link> 
    <description>All you need to know about RSS</description>
</item>

4) Adding more items

More items may be added to this channel.

5) Upload the file

Put the feed.xml file into your website, among other web pages.

6) Validate the file

RSS ResourcesYou may use this online .

7) Make it available

This is accomplished by adding a rss button on the home pagel. A click on the button should display the xml file you have created. RSS Feed

<a href="http://www.premierdirectory.org/feed.xml> <img src="xml.pnj"> </a>

8) Update the feed

To publish further articles, you have just to add items, and remove older ones to keep the number of articles constant.

Example: the complete file


<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Premier Directory</title>
    <link>http://www.premierdirectory.org/</link>
    <description>Xml graphical interface etc...</description>
    <image>
        <url>http://www.premierdirectory.org/xul-icon.gif</url>
        <link>http://www.premierdirectory.org/index.html</link>
    </image>
    <item>
       <title>News of today</title>
       <link>http://www.premierdirectory.org/xml-rss.html</link> 
       <description>All you need to know about RSS</description>
    </item>
    <item>
       <title>News of tomorrows</title>
       <link>http://www.premierdirectory.org/xml-rdf.html</link> 
       <description>And now, all about RDF</description>
    </item>
  </channel>
</rss>

A RSS document


RSS ResourcesYou can Download the Example and use it as a template.

Dublin Core and RSS: example in RSS 1.0 (RDF)

On the RDF, page, the Dublin Core format has been evocated, about describing work of authors and other documents.
RSS 1.0 version, based upon RDF is of course the one used by Dublin Core for Rss feed.

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="http://www.premierdirectory.org/authors.rss">
    <title>After Gutemberg</title>
    <link>http://www.premierdirectory.org/</link>
    <items>
      <rdf:Seq>
        <rdf:li resource="http://www.premierdirectory.org/Dickens/"/>
        <rdf:li resource="http://www.premierdirectory.org/Swift/"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="http://www.premierdirectory.org/Dickens/">
     <title>Dickens</title>
     <link>http://www.premierdirectory.org/Dickens/</link>
     <description>Poor little boy in a very bad world</description>
  </item>
  <item rdf:about="http://www.premierdirectory.org/Swift/">
     <title>Swift</title>
     <link>http://www.premierdirectory.org/Swift/</link>
     <dc:date>1712</dc:date>
  </item>
</rdf:RDF>


The difference with RSS 2.0 is in the use of RDF, that describes firstly the structure and then describe elements of the structure.
 

Specifications and Tools

Specifications and licence of use

  • Rss 2.0.
  • of RSS 2.0. Is named "Attribution/Share Alike Creative Commons License".

Tools to generate and test a RSS feed

  • Online service that uses hints in your Html code to generate a feed.
  • Tool for scraping web sites using XPath expressions.
  • enter the URL of your file to check the feed.

Tools to read RSS feeds

  • A rss readed with a XUL user interface.
  • rss reader for Windows, Linux and Mac.
  • Rss extension for Firefox.
  • Dealing with multiple standards by using XSLT. Includes JavaScript functions to extract the info (and create the list).

Scripts to create a list on a web page

  • PHP script to extract info from RSS feeds.

Examples of feeds

  • provides a rss feed to aggregate. Click on the orange button.

Article Source: http://www.premierdirectory.org/

About the Author
D.G. Sureau is one of the most respected Internet Technology specialists on the web.
Article Section Menu

Article Home
Submit an Article
Author Guidelines
Publisher Guidelines
Privacy Statement


Search for Articles
   

Print this Article
 
   

Home | About Us | Submit a Site | Submission Guideline | Articles | Contact Us | Link to Us | Blog | Privacy Policy | Sitemap

Copyright © 2006 - 2007 Website Design, Functionality and Content - PremierDirectory.Org, All rights reserved.
Do not copy without a written permission.