Web Technology : RSS Feeds
Web Technology – RSS Feeds |
By Rajeev Kumar
- Introduction
- Learning Objectives
- RSS Technology
- Full Form of RSS
- Definition of RSS
- Purpose of RSS
- Evolution of RSS
- Creating RSS
- Using XML programming
- Basics of XML
- Making RSS Using XML
- Using available software
- Using XML programming
- Reading RSS
- RSS Reader for Windows platform
- RSS Reader for Linux platform
- Benefits and Uses of RSS Feeds
- Let us sum up
- Glossary
- Answers to SAQs
- Web Resources
Introduction |
In the present age of Internet and rapid changing web technology, it is almost impossible to visit the website these days without seeing mention of RSS or icons pointing to RSS resources. RSS is most commonly used on news sites and blogs. It is one of important advertising tools about the new products. Visitor can be updated as soon as new content is added. RSS (Really Simple Syndication) is a method of delivering web content to users that does not necessarily require a web browser. It is becoming increasing popular. In technical words, RSS is an XML-based format for content distribution. Webmasters create an RSS file containing headlines and descriptions of specific information. While the majority of RSS feeds currently contain news headlines or breaking information the long term uses of RSS are broad. RSS is a defined standard based on XML with the specific purpose of delivering updates to web-based content. Using this standard, webmasters provide headlines and fresh content in a succinct manner. The present unit gives you a fair idea about RSS Feeds, technology behind it and its benefits and uses. How concept of RSS Feeds evolved is also disccused here. One complete section is all about how to create one's own RSS feeds section using XML. RSS Reader, a program to see the result of feeds, is very important. Visitors use RSS Readers or RSS Aggregators to collect and monitor their desired / favourite feeds in one centralized program or location. Content viewed in the RSS Reader or RSS Aggregator is place known as an RSS feed. A separate section is given on RSS Readers. There are tables listing the various RSS Readers and their source. Enjoy this unit and "Be Happy with RSS Feeding".
RSS TECHNOLOGY |
RSS is a technology that is being used by millions of web users around the world to keep track of their favorite websites.
In the ‘old days’ of the web to keep track of updates on a website visitors had to ‘bookmark’ websites in their browser and manually return to them on a regular basis to see what had been added.
RSS has become a valuable technology for everything from casual web users to webmasters. According to a recent Yahoo survey only 12% of internet users are aware of RSS and a mere 4% have knowingly used RSS. RSS exists as a means to gather and display information quickly and easily. It's an easy way for you to keep up with news and information that's important to you, and helps you avoid the conventional methods of browsing or searching for information on websites. Now the content you want can be delivered directly to you without cluttering your inbox with e-mail messages. This content is called a "feed."
RSS is written in the Internet coding language known as XML (eXtensible Markup Language), which is why you see RSS buttons commonly labeled with this icon:
Full Form of RSS |
RSS stands for more than one thing. Usually, RSS stands for "Really Simple Syndication". But it can also mean "Rich Site Summary" or "RDF Site Summary", where RDF stands for "Resource Description Framework." RDF Site Summary is the first version of RSS created in March 1999. This version became known as RSS 0.9. In July 1999, a new version RSS 0.91 was produced and renamed RSS as "Rich Site Summary". A new version RSS 2.0 was released in September 2002 and now RSS became Really Simple Syndication.
Definitions of RSS |
The technical acronym for RSS is “Really Simple Syndication”, an XML format that was created to syndicate news, and be a means to share content on the web. Now, to geeks and techies that means something special.
Wikipedia defines RSS as follows: “RSS is a family of Web feed formats used to publish frequently updated works such as blog entries, news headlines, audio, and video in a standardized format. An RSS document (which is called a "feed," "web feed," or "channel") includes full or summarized text plus metadata such as publishing dates and authorship. Web feeds benefit publishers by letting them syndicate works quickly and automatically. They benefit readers who want to subscribe to timely updates from favored websites or to aggregate feeds from many sites into one place.” For better understanding about RSS, suppose you have 50 sites and blogs that you like to visit regularly. Going to visit each website and blog everyday could take you hours. With RSS, you can “subscribe” to a website or blog, and get “fed” all the new headlines from all of these 50 sites and blogs in one list, and see what’s going on in minutes instead of hours. What a time saver! That one place where your RSS list is created is called an RSS Reader, and it gathers all the headlines from all the websites and blogs you have subscribed to. Let us see some more definitions as defined by various sites: -
- RSS (n) RSS is a Web content syndication format. Its name is an acronym for Really Simple Syndication. RSS is a dialect of XML. (Source: Harvard – http://blogs.law.harvard.edu/tech/rss)
- RSS (n) RSS is a format for syndicating news and the content of news-like sites, including major news sites like Wired, news-oriented community sites like Slashdot, and personal weblogs. (Source: http://www.xml.com)
- RSS (n) Really Simple Syndication (RSS) is a lightweight XML format designed for sharing headlines and other Web content. (Source: http://www.webreference.com)
- RSS (n) Really Simple Syndication (RSS) is an XML-based format for content distribution (Source: http://www.cnet.com)
- RSS (n) RSS is an XML-based format for syndicated content. (Source: http://www-3.ibm.com)
- RSS (n) RSS is an acronym for Rich Site Summary, an XML format for distributing news headlines on the Web, also known as syndication. First started by Netscape as part of the My Netscape site, it expanded through Dave Winer and Userland. RSS started off in an RDF format. (Source – http://www.newsmonster.org)
Purpose of RSS Feeds |
- Instant Information - Using RSS Feeds, information is updated in real-time.
- Single Source - All information aggregated in a single location.
- Rapid Scanning - RSS feed readers highlight unread headlines and hence scanning is fast.
- Categorizing - In RSS Feeds, information can be categorized by theme and hence easy to see favourite feeds.
Evolution of RSS Feeds |
Concept of RSS begins in 1995 when Advanced Technology group led by Ramanathan Guha developed Meta Content Framework at Apple Computer’s. However RSS was born in 1997, when Dave Winer developed scriptingNews in 1997. First version of RSS was created by Ramanathan V. Guha at Netscape in March 1999, when RDF Site Summary was used on the portal of Netscape. This version is known as RSS 0.9 and was simply XML with an RDF header. Dave Winer improved his scriptNews by including the features of RSS 0.9 at UserLand Software company. Later on Dan Libby of Netscape developed a new version RSS 0.91 in July 1999 that was renamed as Rich Site Summary. In this version, RDF header was removed. Winer published a modified version of the RSS 0.91 specifications on the UserLand website, covering how it was being used in his company’s products. In Y2K, the RSS-DEV Working group lead by Rael Dornfest and Guha at O’Reilly Media developed RSS 1.0 in December. This version is often confused as being a new version of 0.91, but it was a completely new format with no ties to RSS 0.91. Instead, this new version reclaimed the name RDF Site Summary from RSS 0.9 as it reintroduced support for RDF and added XML name spaces support adopting elements from standard metadata. Further Winer also released RSS 0.92, which is a minor set of changes aside from the introduction of the enclosure element, which permits audio files to be carried in the RSS feeds and helped spark podcasting. He also claimed for RSS 0.93 and RSS 0.94, but hardly used. September 2002 is a mile stone year for RSS. In this year in September, Winer released a major new version of the format RSS 2.0. Now RSS is known as Really Simple Syndication. Later on, Winer and UserLand Software assigned the copyright of the RSS 2.0 specification to Harvard's Berkman Center for the Internet & Society in July 2003.
The first RSS feed icon (orange square with radio waves : ) was adopted by Microsoft in December 2005, which became industry standard for RSS feeds.
Some more icon you can see on various sites for representing RSS / XML are as follows:
|
An RSS Advisory Board was launched by Dave Winer with Brent Simmons and Jon Udell, whlse purpose was to maintain and publish the specificatio and answer questions about the format in 2003. Another RSS Advisory Board was launched by Rogers Cadenhead with a desire to continue the deveopment of the RSS format and resolve ambiguities in January 2006. Presently, three main versions of RSS are being used. These are RSS 0.91, RSS 1.0 and RSS 2.0. As the findings of www.syndic8.com in January 2007, Of these, RSS 0.91 accounted for 13% of worldwide RSS usage is RSS 0.91, 67% is RSS 2.0 and 17% is RSS 1.0. As of August 2008, the syndic8.com website was indexing 438,102 RSS Feeds.
Visit the URL http://www.syndic8.com, see the latest statistics of worldwide RSS usage.
|
CREATING RSS FEEDS |
As discussed earlier that RSS Feeds are created using XML format. Hence to cerate one’s own RSS Feeds to be delivered through website, knowledge of XML is must. XML is a markup language much like HTML. In the next subsections, we will try to understand how to write XML codes for RSS Feeds. However there are several RSS Feed creation software also availagle, for which knowledge XML programming is not needed.
Using XML Programming |
Before learning how to write RSS Feeds using XML, let us try to learn basics of XML.
- Basics of XML
XML stands for eXtensible Markup Laungauge, which was designed to transport and store. XML is very easy to learn. Like HTML (Hyper Text Markup Language), tags are basic thing in XML. But XML tags are not predefined. One may define his / her own tags. XML is a W3C Recommendation. It is just plain text. Software that can handle plain text can also handle XML.
Structre of XML documents: -
XML documents form a tree structure given as below: -
<root> <child> <subchild>.....</subchild> </child> </root>
The elements in an XML document form a tree type of structure. The tree starts at root and branches to the lowest level of the tree. All elements can have sub elements terms as child elements. The relationship between various elements of an XML document are described using the terms parent, child and siblings. Parent elements have children and children on the same level are known as siblings. All elements can have text content and attributes.
Let us take an example of XML document which contains a note regarding meeting from Director to All Scientist: -
<?xml version="1.0"?> <note> <to>All Scientists</to> <from>Director</from> <heading>Meeting</heading> <body>Please make your presence in the meeting to be held tomorrow with Google representatives regarding sharing of our union database.</body> </note>
In the above XML program, first line is the XML declaration. It defines the XML version (1.0). The next line describes the root element, called note, of the. The next 4 lines describe 4 child elements of the root (to, from, heading and body) and finally the last line defines the end of the root element.
Following are basic syntax rules of XML: -
- The first element must be a root element, which is the parent of all other elements.
- Name of an XML element can contain letters, numbers and other characters, but it must not start with a number or punctuation character. Also it must not start with letters xml, XML, Xml etc. and it can not contain spaces.
- All XML elements must have a closing tags.
- XML tags are case sensitive and hence opening and closing tags myst be written with the same case.
- XML elements must be properly nested.
- Tags may contain some special property i. e. additional information about elements with associated values, which is called tag’s attribute and their value. XML attributes must be quoted.
For some special characters, there are predefined entity references: -
After learning basics for XML, now let us try to understand how to write RSS using above concepts.
Here is the structure an RSS Feed using XML: -
Description of the above code: -
The first line in the document is the XML declaration which defines the XML version used in the document.
The next line is the RSS declaration which identifies that this is an RSS document (in this case, RSS version 2.0).
The next line contains the <channel> element. This element is used to describe the RSS feed. In fact, RSS Feed is a series of items, these items are chained together to create what is called a “Channel”. The Channel appears at the top of the file and tells the use how the items relate to each other.
The <channel> element has three required child elements:
- <title> - Defines the title of the channel
- <description> - Describes the channel (e.g. Free web building tutorials)
- <link> - Defines the hyperlink to the channel
Each <channel> element can have one or more <item> elements. The open channel tag <channel> occurs before the first item and the close tag </channel> appears after the last item.
Each <item> element defines an article or news or detailed information or story in the RSS feed.
The <item> element has three required child elements:
- <title> - Defines the title of the item
- <description> - Describes the item
- <link> - Defines the hyperlink to the item
At the end of each item, there must be closed tag of item element.
Finally, the two last lines close the channel and rss elements.
Besides above, following elements may be used under <channel>, which are optional: -
- <category> - it defines one or more categories for the feed.
- <copyright> - it notifies about copyrighted material.
- <generator> - it specifies the program used to generate the feed (about this more details are in next subsection).
- <image> it allows an image to be displayed when RSS Reader present a feed.
- <language> it specifies the language the feed is written in.
- <pubDate> - it defines the last publication date for the content of the feed.
- <webmaster> - it defines the e-mail address to the webmaster of the feed.
Following are some sub-elements for <item> element, which are optional: -
- <author> - it specifies the e-mail ID to the author of the item.
- <category> - it defines one or more categories the item belong to.
- <comments> - it allows an item to link to comments about that item.
- <enclosure> - it allows a media file to be included with the item.
- <pubDate> - it defines the last publication date for the item.
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic
- it specifies a third party source for the item.