SunQuest
 
       XML
  Home arrow XML arrow Page 4 - Simple Web Syndication with RSS 2.0
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Simple Web Syndication with RSS 2.0
By: Nilpo/Developer Shed Staff Writer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2007-01-24

    Table of Contents:
  • Simple Web Syndication with RSS 2.0
  • Sharing your content
  • The XML:RSS 2.0 namespace
  • Expanding the channel
  • Expanding your content listing
  • Making your feed available

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Simple Web Syndication with RSS 2.0 - Expanding the channel


    (Page 4 of 6 )

    There are a number of optional elements that you can use to add the effectiveness of your channel.  These elements are used to provided additional, more specific information about your content.

    There are additional elements at both the channel level and the item level.  The additional channel elements are used to improve indexing and to provide additional information about your channel to your readers.  The additional item elements are used to provide additional information about your content and to help ensure that your feed updates properly in news readers.

    We’ll begin with the additional channel elements.  You may or may not need to use all of these.  The rule of thumb is to add as many as you can so that your feed contains as much information as you are able to provide.  The following table lists all of the additional channel elements.

    Element

    Description

    copyright

    The copyright notice for your channel.

    managingEditor

    The email address for the person responsible for the item content.

    webmaster

    The email address of your contents technical contact.

    pubDate

    The publication date of your content.

    lastBuildDate

    The last time the channel feed was updated.

    category

    Used to specify categories that your channel belongs in.  Valid values will be provided by the listing service or the site that your feed will appear on.

    generator

    A string that indicates the program that generated the channel.

    docs

    A URL pointing to the documentation for the RSS specs that were used to build this channel.  (For reference purposes)  For RSS 2.0 this will always be:

    http://blogs.law.harvard.edu/tech/rss

    cloud

    Used to provide information for the rssCloud interface.

    ttl

    Time To Live – indicates how many minutes a channel can be cached before the news reader refreshes it from the source.

    image

    A gif, jpg, or png that can be displayed as your channels thumbnail.

    rating

    The channel’s PICS rating.

    textInput

    Used to provide a text box for user input however support for this element is extremely limited.

    skipHours

    A value between 0 and 23 that tells news readers when not to update your channel.

    skipDays

    A value containing a day of the week that tells news readers when not to update your channel.

    Again, you will not use most of these elements.  I’ll show you only the ones that relate to my channel.  For complete documentation, you can visit the RSS 2.0 Specification on the Harvard Technology site.

    My updated channel portion looks like the following:

    <title>Popular Articles by Nilpo</title>

    <description>Popular articles by Nilpo published by Developer
    Shed.</description>

    <link>http://www.nilpo.com</link>

    <language>en-us</language>

    <copyright>Copyright &copy; 2006,2007 Developer Shed, Inc.</copyright>

    <managingEditor>contacteditor@developershed.com</managingEditor>

    <pubDate>Sat, 13 Jan 2007 00:00:01 GMT</pubDate>

    <lastBuildDate>Sat, 13 Jan 2007 00:00:01 GMT</pubDate>

    <docs>http://blogs.law.harvard.edu/tech/rss</docs>

    <ttl>1440</ttl>

    Here I’ve just added some additional information about my channel that will help news readers update it properly.  Some confusion arises between the pubDate and the lastBuildDate.  Many times these values are the same.  Basically, the pubDate indicates when the newest content went live.  The lastBuildDate indicates when the channel feed (rss page) was generated.

    If I had a cron on my website that auto generated my RSS channel daily, it would update the lastBuildDate each time it ran.  The pubDate would only be updated when it found new content.  The lastBuildDate and pubDate should both be listed in GMT.

    The ttl element tells news readers to only update my rss feed once a day.  Since articles on Developer Shed are only released once a day, there’s no point checking any more than that.

    More XML Articles
    More By Nilpo/Developer Shed Staff Writer


       · This is the first of a 3 part series that deals with Web Syndication. We start off...
       · Awesome article! I've followed the instructions and have successfully set up a RSS...
       · Thanks for the comments. I'm glad that you found this article helpful. :)
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway