Setting a simple RSS feed
with Firefox and RSS Editor

Editing the file with the news

Among the numerous RSS feed editors (RSS builder, ssrss, Feededit...), I chose a Firefox extension: RSS Editor. This extension is not compatible with Firefox 3.0.

Once installed (use Firefox 2), we can find three options to open the editor in the Tools menu.

editor selections

Choose the one you prefer.

First, we will create the file news.xml (we can use news.rss instead) and fill the Channel tab.

Creation of the rss file

The Channel: the basic info about your feed

Title
the title of your feed. (here news)
Link
The URL to your HTML website. (here http://www.site.com)
Description
Phrase or sentence describing the channel, what your feed is about. (here this is a test)
Language
the allowable value of the language used. (here en)
Copyright notice
Copyright notice for content in the channel. (could be Copyright 2005, owner)
Managing Editor
if you don't fear SPAM, Email address for person responsible for editorial content. (could be D @ site.com)
Web Master
if you don't fear SPAM, Email address for person responsible for technical issues related to the channel. (could be D @ site.com)
Publication Date
The publication date for the content in the channel. (will be filled by RSS Editor but you can modify it)
Last Built Date
The last time the content of the channel changed. (will be filled by RSS Editor but you can modify it)
Channel Image
url, title and link for an image that can be displayed with the channel.

Then we will enter a message in the Items (Items/Insert) tab.

Nouvelle n°1

The Item: your text and a link to the full story.

A channel may contain any number of <item>s.

Title
the title of your story. (here test 1)
Link
The URL of the full story. (here http://www.site.com/site1.html)
Description
The item synopsis. (here test1)
Author
if you don't fear SPAM, Email address of the author of the item. (could be D @ site.com)
Category
Includes the item in one or more categories. (could be RSS)
GUID
A string that uniquely identifies the item. (will be filled by RSS Editor but you can generate one)
Publication Date
The publication date of the item. (will be filled by RSS Editor but you can modify it)
Comments URL
URL of a page for comments relating to the item. (could be http://www.site.com/comments.html)
Source
The RSS channel that the item came from.
Source feed URL
url of the previous sub-element.

The two icons (icons) will allow us to add or insert other news.

In a folder of the site (here in the root), we save the file news.xml (click here to look at its content).
This file is a minimum.
Its syntax can be verified with a validator.

Features of the latest updates:

Version 0.0.9 allows you to have all tags in RSS 2.0 (specifications), to hide less frequently used fields and asks you if you want to save before closing.

Version 0.0.9 also adds support of a single xml-stylesheet.
This option allows CSS to control the display of the xml file (news1.xml without stylesheet - news2.xml linked to the stylesheet rss.css) if you don't use any HTML tag in your text and if you accept the differences between Mozilla/Opera and MSIE parsing.

ajouter une feuille de style
topTop of the page

Making the RSS feed accessible

So that the feed (here in the root) can be spotted by a browser and so that the extension Sage (or any other aggregator) can find and read it, we have to add in the <head> part the following line:

For a HTML file:
<link rel="alternate" title="test RSS"
  type="application/rss+xml" href="/news.xml">
For a XHTML file:
<link rel="alternate" title="test RSS"
  type="application/rss+xml" href="/news.xml" />

With Firefox, our RSS feed appears at the bottom of the screen with the title given in the HTML file:

Subscribe

With the extension Sage, we can read:

displaying the feed with Sage
topTop of the page

Offering a HTML version with PHP

As few visitors actually use an RSS feed, we can generate a HTML version of the file: news.php.

The following script that I use allows me to fetch the news in the file news.xml and display them.
The routine accepts any HTML tag but won't verify the syntax. If necessary, it must be adapted to your needs.
The script could save the parsed version and, when called, compare its dates to the last published date of the feed and send the cached version if it is newer.

This routine supports version 0.0.8 of RSS Editor.

The script

If there is no syntax error with the HTML tags of the xml file, no problem, the page will be correctly displayed with any browser.

As this page will be linked by one or more pages of the site, it will be indexed as any other page.

topTop of the page

With javascript

W3C XHTML 1.0
W3C CSS