XML
  Home arrow XML arrow Page 2 - Building an RSS File
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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: 4 stars4 stars4 stars4 stars4 stars / 6
    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:
      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

    Virtual Tradeshows by Ziff Davis Enterprise – A Unique Opportunity to Interact with IT Experts, Access Information, and Gain Insight on Today’s Trends in Technology Learn more

    Building an RSS File - Required Elements
    (Page 2 of 4 )

    Table 2.

    Element

    Description

    Example

    title

    The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.

    mysite.com Tech News

    link

    The URL to the HTML website corresponding to the channel.

    http://www.mysite.com/

    description       

    Phrase or sentence describing the channel.

    The latest tech news from mysite.com.

    Simple RSS Document Structure:

    Let's look at an example of a "Simple"RSS Document:

    <?xml version="1.0" ?>
    <rss version="0.91">
      <channel>
        <title>RSS Tutorial </title>
        <link>http://www.linktothestory.com</link>
        <description> The RSS Tutorial</description>

        <item>
          <title>RSS Syndication </title>
          <link>http://www.linktothestory.com</link>
          <description>Blah,Blah...</description>
        </item>

        <item>
          <title>Technology in Crisis??</title>
          <link>http://www.linktothestory.com</link>
          <description>The problem with technology in Schools</description>
        </item>

      </channel>
    </rss>

     

    As you can see all RSS Documents start with a "<?xml version?>" tag and end with a "</rss>" tag. This is also where you include the encoding type of the document. Without the <rss> tags, this will just be a bog standard, XML document. Immediately after the opening RSS tag, the channel is opened by the <channel> tag, after which a title, link and a description of your channel content is given. All of the elements are required; if even one of these elements is missing, your document will not pass a validator's test and most RSS readers will not be able to parse your content. Table 2 describes the three individual tags that comes immediately after the opening channel tag.

    Now the <item> tags are at the heart of the document. They contain the link, title, and description fields that describe your news stories or articles that you want the world to know about. This is what every RSS reader will be looking for when it reads your document. An item is a story or headline (it can be anything you want really) that contains a Title and link to the story and a description of the story itself.

    More XML Articles
    More By Jacques Noah


       · Hope you enjoyed my article. Any comments are very welcome
     

       

    XML ARTICLES

    - 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
    - XForms Basics




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