XML
  Home arrow XML arrow Page 3 - 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? 
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 - Enhanced RSS Document Structure
    ( Page 3 of 4 )

    Here's an example:

    <?xml version="1.0" encoding="UTF-8"?>
    <rss version="2.0">
      <channel>
        <title>The Programmers Site</title>
        <link>http://www.thelinker.com</link>
        <description>think big</description>
        <pubDate>Wed, 05 Apr 2006
    23:58:37</pubDate>
       
    <lastBuildDate>Wed, 05 Apr 2006
    23:58:38</lastBuildDate>
       
    <language>en-us</language>
       
    <copyright>Copyright 2006, TheSite</copyright>
       
    <webMaster>ad@k.com (John Doe)</webMaster>
       
    <managingEditor>ad@l.com (John Doe)</managingEditor>
       
    <generator>RSS Builder V1.0 2006(c)</generator>
       
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>

        <image>
         
    <title>Site Image</title>
         
    <link>http://www.thelinker.com</link>
         
    <url>http://k.com/thelink.gif</url>
         
    <width>20</width>
         
    <height>20</height>
       
    </image>

        <item>
          <title>The title of the story here</title>
          <link>the link to the story here</link>
          <description>The description here
          </description>
        </item>
      </channel>
    </rss>

    The section in bold is the only difference between a simple version and a enhanced version. The enhanced version makes more information about the creator of the RSS document available to the RSS reader and aggregators. None of this really matters as far as an RSS reader is concerned, as long as the required elements are included.

    Take a careful look at the image tag. It has three required tags: title, link and url, and two optional tags: width and height. Table 3 below explains how these tags are used and what they are for.

    Table 3:

    Element

    Description

    Example

    title

    describes the image; it's used in the ALT attribute of the HTML <img> tag when the channel is rendered in HTML.

    RSS Tutorial

    link

    is the URL of the site; when the channel is rendered, the image is a link to the site. (Note, in practice the image <title> and <link> should have the same value as the channel's <title> and <link>.

    http://www.mysite.com/

    url

    is the URL of a GIF, JPEG or PNG image that represents the channel.

    http://www.mysite.com/theimage.gif

    width

    Width of the image. Maximum value for width is 144, default value is 88.

    44

    Height

    Height of the image. Maximum value for height is 400, default value is 31.

    45



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

       

    XML ARTICLES

    - 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...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT