Technical Case Study
RSS , XML, JS Feed
Technologies Used: XML
Introduction
RSS is a text-based format, a type of XML. This is why RSS files are often labeled as XML. RSS version 1.0 is also RDF, which again, is important only because an RSS file may be labeled as RDF. RSS files (which are also called RSS feeds or channels) simply contain a list of items. Usually, each item contains a title, summary and a link to a URL (e.g. a web page). Other information, such as the date, creator’s name, etc., may also be available.
The most common use for RSS files is for news and other chronologically reverse-ordered websites like blogs. An item’s description may contain the complete news article, blog post, etc., or just an extract or summary. The item’s link will usually point to the full content (although it may also point to what the content itself links to).
When a website has an RSS feed, it is said to be “syndicated.” There are various other syndication formats besides RSS (such as Atom), but RSS is by far the most widely used and supported today. RSS files do not have a common file extension, although they frequently end in one of .xml, .rss, or .rdf (note
that other extensions may be used also). The term “scraping” refers to creating an RSS feed for a website that does not provide one itself (i.e. scraping the text off of the page). That is, the same people who created the content within the feed do not create scraped feeds. Scraped RSS feeds may stop working if the page changes its layout.
Some key points to be aware of from the outset include:
- The use of RSS benefits everyone involved – for publishers and content providers, details of new content can be accessed by a much broader audience, for web site producers new content can be easily integrated into web sites or portals and for end users easy access to new content is greatly facilitated.
- An RSS file (also known as an RSS feed or RSS channel) consists of a list of items, each of which contains a title, description and a link to a web page. Typically the full content itself is made available separately and can be accessed by the link in the RSS file.
- Utilizing an RSS feed is straightforward. Once an RSS file is made available on a web site, interested parties can simply gather the file from the site and reuse the content in a variety of ways.
- There are a number of different versions of RSS. Although this has led to some confusion and debate it is not a major issue as almost all RSS applications can handle any RSS version.
- RSS can stand for 'Rich Site Summary', 'RDF Site Summary' or 'Really Simple Syndication' depending on who you ask and which version they are speaking about.
- RSS is an XML based format.
How it works
Exactly what an RSS feed looks like will depend on which version of RSS is being used. At the most basic level a feed consists of a channel with its own attributes (e.g. title, description, URL, creation date etc) and a number of items each with their own attributes (e.g. title, description, URL etc). A schematic diagram outlining the basic structure of an RSS file is illustrated below:
The information enclosed between the <channel> tags is used to describe the feed itself. The code snippet below illustrates a typical channel description.
<channel>
<title>BBC News | UK | UK Edition</title>
<link>http://news.bbc.co.uk/hi/uk/default.stm</link>
<description>BBC UK News updated every minute of every day</description>
</channel>
Each item in the RSS feed is described between <item> tags and at the most basic level these include title, links and descriptions as illustrated below.
<item>
<title>Clare Short quits post over Iraq</title>
<description>Clare Short quits the cabinet, accusing Tony Blair of breaking his promises over the UN's role in rebuilding Iraq.</description>
<link>http://news.bbc.co.uk/hi/uk_politics/3019871.stm</link>
</item>
Icons are sometimes used by webmasters to link to RSS files although there is little standardization on the actual icons used - the color, text and size may vary from these illustrated below.
Specifications
There are currently multiple versions of RSS in use including RSS 1.0, RSS 2.0 and many deprecated versions. Both RSS 1.0 and RSS 2.0 are being separately and independently developed. RSS 2.0 is not a progression of RSS 1.0 despite what the version numbers might suggest. There has been much debate about which of these version is better but both have their own benefits and drawbacks and most RSS applications and tools support both formats. Both formats are based on XML and have general similarities in structure.
RSS 1.0
In this version RSS stands for 'RDF Site Summary'. RSS 1.0 utilizes the Resource Description Framework (RDF) that is the W3C recommendation for metadata. Due to the use of RDF, RSS 1.0 is thought to be more flexible, if more complex than other versions.
Basic Structure of an RSS 1.0 file
<rdf>
<channel />
<image />
<textinput />
<item />
<item /> ...more items
</rdf>
RSS 2.0
In this version RSS stands for 'Really Simple Syndication' and the emphasis is clearly on simplicity. RSS 2.0 follows on from the various RSS 0.9x specifications (RSS 0.90, RSS 0.91, RSS 0.92, RSS 0.93) and is championed by David Winer of UserLand. Although RSS 2.0 is the current version, RSS 0.91 is still the dominant format on the web in terms of the sheer number of feeds.
Basic Structure of an RSS 2.0 file
<rss>
<channel />
<image />
<textinput />
<item />
<item /> ...more items
</channel>
</rss>
Applications
There are a number of applications for RSS feed. The most popular ones are:
- Displaying headlines on other websites
- Search engines
- Aggregating RSS feeds from multiple websites
Benefits
The main benefits of creating an RSS feeds are as follows:
- RSS is an excellent and cost-effective way of driving traffic to, and increasing brand awareness of any website that publishes content regularly (e.g. news, jobs, and events). Once a publisher produces an RSS file, they enable others to syndicate their headlines without any further work on their part.
- RSS is the dominant format for distributing headline content on the Web.
- RSS allows easy sharing of data between sites. Webmasters can use an RSS file to easily incorporate a third party content into their own site.
- Content from RSS feeds can be easily multi-purposed allowing, for example, cross searching of a number of different feeds at once.
- RSS content can be added to personal desktop news reading applications like Feed reader or AmphetaDesk.
Conclusion
Applying RSS feed would be highly advisable for a website aiming for branding and promotion.