XML
  Home arrow XML arrow Building an RSS File
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
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? 
Google.com  
XML

Building an RSS File
By: Jacques Noah
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 7
    2007-02-13


    Table of Contents:
  • Building an RSS File
  • Required Elements
  • Enhanced RSS Document Structure
  • Aggregators

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Building an RSS File
    ( Page 1 of 4 )

    In the previous article we discussed how to read an RSS file with PHP. In this article we will focus on the theoretical aspects of how to build an RSS file.

    What is RSS?

    RSS is an acronym for Really Simple Syndication. It is used to provide information about your website to the world. There is not really any difference between an XML document and an RSS document; in fact most people would agree that RSS is an XML dialect. All RSS documents must conform to the XML specification, which is published on the W3C website. We have several different versions of RSS formats. Let me explain why.

    RSS was first invented by Netscape. They wanted to use an XML format to distribute news, stories and information for their My Netscape Portal back in the mid 1990s. For some reason Netscape lost interest in RSS and abandoned it just as it was becoming popular, and a company called Userland started to develop it for use in its products. As the format became more popular, the question of ownership of the RSS format became a problem when both Netscape and Userland claimed it as their own. To cut a long story short, we now have several versions of the RSS format, developed by various companies and individuals.

    There are many RSS variations available today, and most RSS readers can still read the earliest, version 0.91. The latest version is 2.0, and can also be read by most RSS readers. There are two kinds of RSS documents. There's what I call the simple kind and the enhanced kind. The enhanced version of an RSS document includes, in addition to the required elements, the following optional elements:

    Table 1.

    Element

    Description

    Example

    Managing Editor

    Email address for person responsible for editorial content.

    jd@mysite.com (John Doe)

    WebMaster

    Email address for person responsible for technical issues relating to the channel.

    jd@mysite.com (John Doe)

    Copyright

    Copyright notice of the content in the channel.

    Copyright 2006, JD Site

    Language

    Language used in the channel. Allows aggregators to group articles by language.

    En-us

    pubdate

    Publication date of the content in the channel.

    Fri, 05 Sep 2005 00:00:001 GMT

    LastBuildDate

    The date of the last time the content changed.

    Fri, 05 Sep 2005 00:00:001 GMT

    Generator

    The name of program that generated the document.

    JD RSS Content Builder

    docs

    A URL that points to a site that would give information about the format used to create this RSS document.

    www.wc3.com

    image

    Specifies an image that can be displayed with the channel.

    Myimage.gif

    clouds

    Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.

    <cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>

    ttl

    ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source.

    <ttl>40</ttl>

    rating

    The PIC rating for the channel.

     

    textinput

    Specifies a text input box that can be displayed with the channel. Further details:

    A channel may optionally contain a  
    <textInput> sub-element, which contains four required sub-elements:

    <title> -- The label of the Submit button in the text input area.

    <description> -- Explains the text input area.

    <name> -- The name of the text object in the text input area.

    <link> --
    The URL of the CGI script that processes text input requests.

     

    skipHours

    A hint for aggregators telling them which hours they can skip. Further details:

    An XML element that contains up to 24 <hour> sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element.

    The hour beginning at midnight is hour zero.

     

    For further info on optional elements please visit: http://blogs.law.harvard.edu/tech/rss

    Let me say a few words about the above optional elements. First of all, these are not all the optional elements that are available; I've just picked the ones I thought were most relevant to my article. If you want a list of all of them you should visit one of the many websites devoted to RSS document creation.

    Secondly, ALL dates must conform to the RFC 822 specification as in the examples in Table 1.

    All these specifications and rules were created because in the past, developers of RSS readers found that their readers could not read all RSS documents, because everybody created RSS documents as they wished. So a common approach to RSS document formatting was agreed upon, with a minimum standard to enable any RSS reader to read any RSS document.



     
     
    >>> More XML Articles          >>> More By Jacques Noah
     

       

    XML ARTICLES

    - Flex Array Collection Sort and Filtering
    - The Flex Tree Control
    - Flex List Controls
    - Working with Flex and Datagrids
    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek