RSS feeds can be created within a simple text editor or dynamically generated by a program. To access RSS feeds you can have programs that output the feeds within your web page.
The <?xml version="1.0"?> tag is the first line of your RSS file. This is the first line of any RSS file. Regardless of standard you decide to use.
<?xml version="1.0"?>
The next line specifies what version of RSS you are using. In our example we are using RSS 2.0.
<?xml version="1.0">
<rss version="2.0">
</rss>
The next line is the 'channel' tag.
<?xml version="1.0"?>
<rss version="2.0">
<channel>
</channel>
</rss>
Next we will add the required <channel> elements. These must be in your RSS file.
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>
ITC News and Announcements
</title>
<link>
http://itc.utk.edu/
</link>
<description>
The latest news from itc.utk.edu, the Innovative
Technologies Center web site.
</description>
</channel>
</rss>
Now we place our item elements. This element is the heart of the RSS feed. It contains the primary content. item elements are optional but an RSS feed without any items is nothing more than a regular link.
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>
ITC News and Announcements
</title>
<link>
http://itc.utk.edu/
</link>
<description>
The latest news from itc.utk.edu, the Innovative
Technologies Center web site.
</description>
<item>
<title>
CMS 110 Introduction
</title>
<link>
https://itc.utk.edu/workshops/workshoplist.shtml#cms110
</link>
<description>
CMS 110 Intro to Online@UT workshop - Wed, Sept 8, 1:30-3:30
</description>
</item>
<item>
<title>
Call for Proposals
</title>
<link>
http://edtech.tennessee.edu/modules/set2005/2005_cfp.shtml
</link>
<description>
ETC's 2005 Project SET Call for Proposals - due Sept. 13, 2004
</description>
</item>
</channel>
</rss>
http://bmw.ws.utk.edu/xml/rss/examples/example1/example1.xml
or
The above example is a simple RSS file that could be classified as RSS 0.91, 0.92 or 2.0. In other words it is a "bare bones" example. that is frequently good enough to suit your purposes. As RSS has evolved, more tags have been added as options. Below we will add a few to our example.
Here we add language, copyright, lastBuildDate, and category tags for channel and items.
<language>
en-us
<language>
- allows parser to only look for english, spanish, etc RSS items
<lastBuildDate>
Tue, 19 Oct 2004 04:00:00 GMT
</lastBuildDate>
- last time the content of the channel changed
<category>
biology
</category>
- at channel level specifies one or more categories the channel belongs to
<category>
botany
</category>
- at item level specifies one or more categories the item belongs to
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>
ITC News and Announcements
</title>
<link>
http://itc.utk.edu/
</link>
<description>
The latest news from itc.utk.edu, the Innovative
Technologies Center web site.
</description>
<language>
en-us
</language>
<copyright>
Copyright 2004 Innovative Technologies Center
</copyright>
<lastBuildDate>
Tue, 19 Oct 2004 04:00:00 GMT
</lastBuildDate>
<category>
biology
</category>
<item>
<title>
CMS 110 Introduction
</title>
<link>
https://itc.utk.edu/workshops/workshoplist.shtml#cms110
</link>
<description>
CMS 110 Intro to Online@UT workshop - Wed, Sept 8, 1:30-3:30
</description>
<category>
microbiology
</category>
</item>
<item>
<title>
Call for Proposals
</title>
<link>
http://edtech.tennessee.edu/modules/set2005/2005_cfp.shtml
</link>
<description>
ETC's 2005 Project SET Call for Proposals - due Sept. 13, 2004
</description>
<category>
botany
</category>
</item>
</channel>
</rss>
http://bmw.ws.utk.edu/xml/rss/examples/example2/example2.xml
or
Source code of how to use image has a hot link
Once you have made your RSS feed you may want to submit it to a validator to to make sure you do not have any errors that will not be acceptable to parsers.
Below is one example of an RSS feed validator
You may want to create a central directory for your organization if you have several RSS feeds from dirrerent departments.
You can submit your RSS feed to various RSS feed directories. Below are a couple.
http://www.syndic8.com
http://www.newsisfree.com - must create an account in order to add feeds
http://www.rssfeeds.com
To read an RSS feed you need to parse the file. You can then include it in your web page. Here we will parse the first RSS feed example above with a sample PHP script.
newsparse.php
newsparse.php source code
Now lets set up a simple RSS parser on your account.
Lets look at parsing with magpieRSS, a PHP parsing application.
Lets look at the class feeds using magpieRSS, a popular PHP RSS parser application.
Single web page with our class RSS feeds - using magpieRSS
default.php source code
magpieRSS source code
It may not be neccessary to access the RSS feed every single time your web page loads. You can set up a cron job to access the RSS feed at a regularly scheduled time and create an include file for youe web page.
server-side include example
news.shtml - the server-side include file inserted automatically into page above
PERL program executed by cron - creates the above server-side include by parsing the RSS feed across the network
cron file example - file to set time for RSS feed to be parsed and include file to be created
You can provide a feed to this tool, then it will create the javascript that you can cut and paste into your website.