How to build an RSS feed
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 contentmany 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 artand 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.
Additional Resources


White Papers & Webcasts
The High Performance Workplace
In this paper we examine the challenges and define the critical steps CFOs, CIOs, COOs and CEOs, in midsized global companies, can take...
How to Reduce Eclipse BIRT Development Effort for Data Visualizations
Web applications can come with a long list of visualization requirements for structured data. By delivering your output through the BIRT Interactive Viewer,...
Extend, Replace, or Convert; which is the best way forward for COBOL Applications?
There are a number of choices when looking at ways to take existing COBOL applications forward. This white paper discusses the most common...
Usability Is Everything
Learn what sets Workday's HR and Payroll solutions apart from the competition....
Accelerate SSL Encrypted Applications
The amount of SSL traffic is growing in the enterprise. Because it is encrypted, it cannot be properly controlled and accelerated. Blue Coat...
The Value of Real SaaS at Workday
Cost savings, speed to value, and innovation brought to the enterprise by Workday's software-as-a-service solutions for HR and Payroll....
ESG Lab Field Audit
Many companies have successfully implemented Riverbed WAN optimization solutions within their Cisco networks. This ESG Lab Field Audit document explores the success that...
SaaS at Flextronics, Inc.
Dave Smoley, CIO of Flextronics, discusses the real value of software-as-a-service and why he chose Workday for his HR solution....
Shape Your Apps Strategy to Reflect New SaaS Licensing and Pricing Trends
Why are smart companies choosing software-as-a-service? Find out in the complimentary Forrester Research report...
Why Compliance Pays
This OnDemand webcast explores the relationship that firms with best compliance records have higher revenue, greater customer retention, lower financial losses from data...
Subscribe to Computerworld
