Ads by TechWords

See your link here
Receive the latest technology news and information.
Application/Web Development
Computerworld Daily News (First Look and Wrap-Up)
Computerworld Blogs Newsletter
The Weekly Top 10
Cloud Computing
View all newsletters




Privacy Policy
 

How to build an RSS feed

October 31, 2003 12:00 PM ET

Computerworld - Excerpted from Apache, MySQL, and PHP Weekend Crash Course, with permission of Wiley Publishing Inc., all rights reserved.


RSS feeds are the current rage in Web site content—many sites use this mechanism to syndicate their content. This session finishes the coverage of the publishing system by showing you how to utilize RSS feeds to syndicate your content.


What Are RSS Feeds?


Netscape introduced RSS in 1999 as a concept to syndicate content. At that time, RSS stood for Rich Site Summary. However, Netscape abandoned the concept in 2001 and UserLand Software began pioneering a similar technology as Really Simple Syndication. Still others refer to the RSS concept as RDF Site Summary.
In any case, RSS exists as a simple way to syndicate content.


Note: UserLand Software maintains quite a bit of documentation on RSS at the Web site: http://backend.userland.com/rss.


Syndication is a means of distributing content with the intent of allowing others to publish it. Typically, syndication applies to newspaper columns, comics, and other works of art—and generally one derives a fee for each use.


In this case, syndication means an easy method for others to preview your content and optionally republish it. Sites such as slashdot.org, cnet.com, and others use RSS feeds to syndicate their content, as do many Weblog (blog) authors.


RSS Syntax


The syntax for RSS feeds varies considerably depending on the version of RSS that you adhere to. However, the feed is usually published as an XML file with a strict syntax. For example, a typical RSS feed file might resemble the following:


 
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>title_of_site</title>
<description>description_of_site</description>
<link>http://link.to.site</link>

<item>
<title>title_of_article</title>
<description>short_desc_of_article ...</description>
<pubDate>pubdate_in_ RFC 822_format</pubDate>
<link>link_to_article</link>
</item>

<item>
...
</item>

</channel>
</rss>


In XML format, the file's headers spell out its content and which version of RSS is being used. The beginning of the <channel> section provides details about the main site, while each <item> section provides details about a particular article. Each feed can have up to 15 <item>s and is generally arranged with the newest article first, the oldest article last. As articles are added to the feed, the older articles are moved off the feed.


Publishing the Feed


The XML file is made accessible via HTTP, and special applications can access the feeds and notify users when the feed is updated. For example, the open source project BottomFeeder can monitor several feeds and even seek out new feeds. Figure 30-1 shows an example of BottomFeeder in action.



Jump to comments

Development

Additional Resources

Xerox
By using solid ink technology only from Xerox, you could save up to 65% by printing color for the cost of black and white. Enter for a chance to WIN a PhaserTM 8860 network color printer!
Microsoft
Save time and mitigate security risk. Deploy it now.
Sybase
In this white paper, IDC analyzes the role of next-generation mobile enterprise platforms as organizations seek a more strategic deployment of mobile solutions.

Learn the important issues you must consider before starting your next mobility initiative. Get your mobility white paper from IDC now, compliments of Sybase.

White Papers & Webcasts

Extend, Replace, or Convert; which is the best way forward for COBOL Applications?
Download this white paper, free, compliments of Micro Focus!  

Forrester Consulting - Optimizing Users and Applications in a Mobile World
Learn how to successfully deploy a WAN optimization solution that is specifically tuned for a mobile environment!  

Effectively Implementing Datacenter Automation
Effectively select and deploy the best datacenter automation solution today!

Faster, Cheaper and Easier to Maintain
Can you afford not to upgrade your servers to today's advanced, energy-efficient technologies?  

Aligning IT to Business: The Rising Importance of Application Delivery Networks
Application Delivery Networking (ADN) will play a vital role in helping enterprises incorporate strategic technologies to achieve business initiatives.

Mitigate Risk, Lower Costs and Improve Network Efficiency
Create a stable IP network that not only meets today's challenges, but is flexible enough to also meet future demands.