Home arrow XML arrow Page 4 - Simple Web Syndication with RSS 2.0
XML

Simple Web Syndication with RSS 2.0


RSS was originally created in 1999 by Netscape as a channel description framework for their My Netscape Network. MNN was a portal system that allowed end users to selectively view new content from their choice of content providers. RSS was created as a means of gathering that content. Since its creation, RSS has been updated and expanded to handle a much wider range of content with a far broader range of uses.

Author Info:
By: Nilpo/Developer Shed Staff Writer
Rating: 5 stars5 stars5 stars5 stars5 stars / 20
January 24, 2007
TABLE OF CONTENTS:
  1. · Simple Web Syndication with RSS 2.0
  2. · Sharing your content
  3. · The XML:RSS 2.0 namespace
  4. · Expanding the channel
  5. · Expanding your content listing
  6. · Making your feed available

print this article
SEARCH DEVARTICLES

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.


blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials