Browse DevX
Sign up for e-mail newsletters from DevX


Set Up a Simple Syndication Feed Using RSS : Page 2

You can set up outbound syndication for your Web site and expose your content to the world in one afternoon using an XML technology called RSS. For anyone who ever wanted to increase audience and traffic while maintaining content and presentation control, RSS is the answer. Find out how to do it, step by step.

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 --->
<rss version="0.91">
<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> editorial@devx.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.


Thanks for your registration, follow us on our social networks to keep up-to-date