A Sample RSS Feed
Once you have completed steps 1 and 2 on the previous page, it's time to dynamically build the text file. This file will be formatted as XML and has two distinct sections. The top section contains basic information about your feed, such as the title and the time the file was generated. The bottom section has information on each specific piece of content that you wish to syndicate (an "item").
First, I'll show an example feed, and then I'll show how to generate and write out the file in ColdFusion. The example feed follows; bold items should be replaced with information for your site.
<?xml version="1.0" ?>
<!-- RSS generated by DevX.com on Fri, 24 Jan 2003 12:38:45 PST --->
<channel> <!--- The 'channel' tag is the area where you specify
general information about your feed--->
<title>DevX Featured Content</title>
<description>Latest DevX Content</description>
<copyright>Copyright 2003 DevX</copyright>
<lastBuildDate>Fri, 24 Jan 2003 12:38:45 PST</lastBuildDate>
If you want to show an image with your content feed, use the optional image section below:
The next section is where each piece of content is identified and described:
<title>Attend to your future. </title>
<description>A future where millions of
users are waiting.</description>
<author> email@example.com </author>
<pubDate>Wed, 22 Jan 2003 11:19:28 PST</pubDate>
<title> etc </title>
<description> etc </description>
<link> etc </link>
<pubDate> etc </pubDate>
You can include as many items as you want. When you're finished, close the channel and rss tags.