Thursday, March 7, 2013

RSS (not the saffron variety)

For much of this week, I've been helping one of my technical teams in publishing dynamic content using a secure RSS feed. So I thought this might be a good time to spread some gyaan (adapted from Web sources) about this technology that is tragically underutilized, at least in India. RSS stands for Rich Site Summary but is more popularly referred to as Really Simple Syndication. It is used to publish (suitable) Web data, along with metadata that describes the data, in a simple XML-based format. This data "feed" can be viewed by various programs including Web browsers and specialized RSS feed readers. Atom is an alternative to RSS for publishing Web feeds

RSS was designed to show selected data, such as news headlines, and provide links to more detailed data, such as news reports. But these links are not crucial if your data is limited and can be provided within the RSS feed itself, as was the case with my team

Every RSS feed contains a mandatory <channel> </channel> element, which encapsulates one or more <item> </item> elements. Each <item> element has three required child elements:
<title> - Defines the title of the item
<link> - Defines the hyperlink to the item
<description> - Describes the item
The description can be used to carry the actual data you want to publish. If your data contains special characters, including XML tags, you can enclose it within a <![CDATA[ ]]> element. Comments can be added using <!-- --> tags, similar to HTML

Your RSS feed file, which should ideally have a .xml extension, can be optionally validated for checking the syntax and then published to your web server. The feed can be updated either manually (by editing the file) or by using a Perl-CGI or PHP program to append new data to the file

No comments:

Post a Comment