Lesson 11 - RSS


DW Cover


RSS

RSS (most commonly translated as "Really Simple Syndication" but sometimes "Rich Site Summary") 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 content automatically. They benefit readers who want to subscribe to timely updates from favored websites or to aggregate feeds from many sites into one place.

RSS feeds can be read using software called an "RSS reader", "feed reader", or "aggregator", which can be web-based, desktop-based, or mobile-device-based. A standardized XML file format allows the information to be published once and viewed by many different programs. The user subscribes to a feed by entering into the reader the feed's URI or by clicking an RSS icon in a browser that initiates the subscription process. The RSS reader checks the user's subscribed feeds regularly for new work, downloads any updates that it finds, and provides a user interface to monitor and read the feeds.

There are several different versions of RSS, falling into two major branches (RDF and 2.*). For the most part, later versions in each branch are backward-compatible with earlier versions (aside from non-conformant RDF syntax in 0.90), and both versions include properly documented extension mechanisms using XML Namespaces, either directly (in the 2.* branch) or through RDF (in the 1.* branch). Most syndication software supports both branches.

The extension mechanisms make it possible for each branch to track innovations in the other. For example, the RSS 2.* branch was the first to support enclosures, making it the current leading choice for podcasting, and as of 2005 is the format supported for that use by iTunes and other podcasting software; however, an enclosure extension is now available for the RSS 1.* branch, mod_enclosure.

As of January 2007, tracking data from www.syndic8.com indicates that the three main versions of RSS in current use are 0.91, 1.0, and 2.0. Of these, RSS 0.91 accounts for 13 percent of worldwide RSS usage and RSS 2.0 for 67 percent, while RSS 1.0 has a 17 percent share. These figures, however, do not include usage of the rival web feed format Atom. As of August 2008, the syndic8.com website is indexing 546,069 total feeds, of which 86,496 were some dialect of Atom and 438,102 were some dialect of RSS.

View this video where Lee LeFever explains RSS in plain English:


Examples

When you create an RSS document you are creating an XML file and saving it with the .xml extension. Since it is written in XML you must follow the same syntax rules:

You have several versions, which were discussed in the previous section, to choose from when creating an RSS document. We will discuss examples using RSS 1.0 and RSS 2.0.

The first example shows how to create an RSS document using version 1.0 which is based on the W3C RDF (Resource Description Framework) standard. The idea behind RDF was to help create a Semantic Web. Read more about RDF and the Semantic Web here. However, this does not matter too much for ordinary users, but by using web standards it will be easier for persons and applications to exchange data.

The first line is the XML declaration statement, defining the XML version and the character encoding used in the document. The next line says what version of RSS is being used. Notice that the channel element contains title, link, images, and references to the items contained within the channel.

RSS 1.0 Example:

<?xml version="1.0" encoding="UTF-8"?> 
<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/">
    <channel rdf:about="http://www.xml.com/xml/news.rss">
       <title>XML.com</title>
       <link>http://xml.com/pub</link>
       <description>
           XML.com features a rich mix of information and services
for the XML community. </description> <image rdf:resource="http://xml.com/universal/images/xml_tiny.gif" /> <items> <rdf:Seq> <rdf:li rdf:resource="http://xml.com/pub/2000/08/09/xslt/xslt.html" /> <rdf:li rdf:resource="http://xml.com/pub/2000/08/09/rdfdb/index.html" /> </rdf:Seq> </items> <textinput rdf:resource="http://search.xml.com" /> </channel> <image rdf:about="http://xml.com/universal/images/xml_tiny.gif"> <title>XML.com</title> <link>http://www.xml.com</link> <url>http://xml.com/universal/images/xml_tiny.gif</url> </image> <item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html"> <title>Processing Inclusions with XSLT</title> <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link> <description> Processing document inclusions with general XML tools can be problematic. This article proposes a way of preserving inclusion information through SAX-based processing. </description> </item> <item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html"> <title>Putting RDF to Work</title> <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link> <description> Tool and API support for the Resource Description Framework is slowly coming of age. Edd Dumbill takes a look at RDFDB, one of the most exciting new RDF toolkits. </description> </item> <textinput rdf:about="http://search.xml.com"> <title>Search XML.com</title> <description>Search XML.com's XML collection</description> <name>s</name> <link>http://search.xml.com</link> </textinput> </rdf:RDF>

The next example uses RSS 2.0. The first line in the document is the XML declaration. The next line is the RSS declaration which identifies that this is an RSS document (in this case, RSS version 2.0). The next element is the channel which describes the RSS feed.

RSS 2.0 Example:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Lift Off News</title>
    <link>http://liftoff.msfc.nasa.gov/</link>
    <description>Liftoff to Space Exploration.</description>
    <language>en-us</language>
    <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
    <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Weblog Editor 2.0</generator>
    <managingEditor>editor@example.com</managingEditor>
    <webMaster>webmaster@example.com</webMaster>
    <ttl>5</ttl> 
    <item>
      <title>Star City</title>
      <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
      <description>How do Americans get ready to work with Russians aboard the
        International Space Station? They take a crash course in culture, language
        and protocol at Russia's Star City.</description>
      <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
      <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
    </item> 
    <item>
      <title>Space Exploration</title>
      <link>http://liftoff.msfc.nasa.gov/</link>
      <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada
        will experience a partial eclipse of the Sun on Saturday, May 31.</description>
      <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
      <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
    </item> 
    <item>
      <title>The Engine That Does More</title>
      <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>
      <description>Before man travels to Mars, NASA hopes to design new engines
        that will let us fly through the Solar System more quickly.  The proposed
        VASIMR engine would do that.</description>
      <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
      <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>
    </item> 
    <item>
      <title>Astronauts' Dirty Laundry</title>
      <link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>
      <description>Compared to earlier spacecraft, the International Space
        Station has many luxuries, but laundry facilities are not one of them.
        Instead, astronauts have other options.</description>
      <pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>
      <guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>
    </item>
  </channel>
</rss>

The channel element contains three required elements:

  1. <title> - Defines the title of the channel (e.g. Lift Off News)
  2. <link> - Defines the hyperlink to the channel (e.g.http://liftoff.msfc.nasa.gov/)
  3. <description> - Describes the channel (e.g. Liftoff to Space Exploration)

Each <channel> element can have one or more <item> elements. Each <item> element defines an article or "story" in the RSS feed.

The <item> element has three required child elements:

  1. <title> - Defines the title of the item (Star City)
  2. <link> - Defines the hyperlink to the item (e.g.http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp)
  3. <description> - Describes the item (e.g. How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's Star City.)

Publish your own Feed

Now that we have seen what an RSS document looks like we are ready to publish a feed on the web.

At w3schools there is an excellent tutorial that walks you through creating and publishing an RSS feed. We will briefly discuss the steps required to do this:

  1. Create the RSS document and name it with the .xml file extension
  2. Validate your RSS file using the Feed Validator
  3. Upload your file to your web server
  4. Copy the little orange RSS Logo or XML Logo button to your web directory.
  5. Put the little orange "RSS" or "XML" button on the page where you will offer RSS to the world (e.g. on your home page). Then add a link to the button that links to the RSS file. The code will look something like this:
    <a href="www.w3schools.com/rss/myfirstrss.xml">
    < img src="www.w3schools.com/rss/rss.gif" width="36" height="14">
    </a>.
  6. Submit your RSS feed to the RSS Feed Directories (you can Google or Yahoo for "RSS Feed Directories"). Note! The URL to your feed is not your home page, it is the URL to your feed, like "http://www.w3schools.com/rss/myfirstrss.xml". Here are some free RSS aggregation services:
  7. Register your feed with the major search engines:
  8. Update your feed as you would your blog. Now you have registered your RSS feed with Google, Yahoo, and MSN. Now you must make sure that you update your content frequently and that your RSS feed is constantly available.

The best way to ensure your RSS feed works the way you want, is to manage it yourself. However, this can be very time consuming, especially for pages with lot of updates. An alternative is to use a third-party automated RSS. Here are a few:

For users who only need an RSS feed for their personal website, some of the most popular blog (Web Log) managers that offer built-in RSS services are:


RSS Readers

An RSS Reader is used to read RSS Feeds and are available for many different devices and OS. Some work as web services, and some are limited to windows (or Mac, PDA or UNIX). Here are just a few:

The Mozilla Firefox browser has a built-in RSS Reader. If you go to a web site that offers RSS feeds, you will see the Firefox RSS icon Firefox RSS Icon in the address bar. Click on the icon to view a list of the different feeds. Choose the feed you want to read.

Click on the little RSS Logo or XML Logo button next to the RSS feed you want to read. Copy The URL you get in the browser window and paste it in your RSS reader.


View this video to see how to make an RSS feed in 1 minute.



Podcasting

A podcast is a series of digital media files (either audio or video) that are released episodically and downloaded through web syndication. The mode of delivery is what differentiates podcasts from other ways of accessing media files over the Internet. Rather than a simple download or streamed webcasts, special client software applications known as podcatchers (like iTunes, Zune, Juice, and Winamp) are used to automatically identify and download new files in the series when they are released by accessing a centrally-maintained web feed that lists all files associated with the series. New files can thus be downloaded automatically by the podcatcher and stored locally on the user's computer or other device for offline use, giving simpler access to episodic content.

The RSS feed icon Firefox RSS Icon is commonly used to indicate the web feed for a podcast.

Lee LeFever describes what podcasting is in plain English.



References and Resources


* click the link below to read this week's homework assignment *
Assignment 11