Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

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.


advertisement
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> <link>http://www.devx.com</link> <description>Latest DevX Content</description> <language>en-us</language> <copyright>Copyright 2003 DevX</copyright> <docs>http://backend.userland.com/rss</docs> <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:


<image> <title>DevX</title> <url>http://www.devx.com/assets/devx/3182.gif</url> <link>http://www.DevX.com</link> </image>

The next section is where each piece of content is identified and described:

<item> <title>Attend to your future. </title> <description>A future where millions of users are waiting.</description> <link>http://www.devx.com/content/id/10559</link> <author> editorial@devx.com </author> <pubDate>Wed, 22 Jan 2003 11:19:28 PST</pubDate> </item> <item> <title> etc </title> <description> etc </description> <link> etc </link> <pubDate> etc </pubDate> </item>

You can include as many items as you want. When you're finished, close the channel and rss tags.

</channel> </rss>



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap