XML
  Home arrow XML arrow Page 6 - 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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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 / 12
    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


    Simple Web Syndication with RSS 2.0 - Making your feed available


    (Page 6 of 6 )

    Save your feed with either the rss or xml extension.  The rss extension is used to indicate rss feeds, and the xml extension can be used since RSS 2.0 is xml based.  Either one can be used interchangeably.  If your site also contains older RSS feeds, I suggest using the rss extension to provide a sense of continuity.

    Here’s my final RSS feed named feed.xml:

    <?xml version="1.0" ?>

    <rss version="2.0">

     

    <channel>

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

    <item>

       <title>A New Toolbar Can Boost Your Web Site Traffic
    Dramatically</title>

       <description>Dev Articles - Embedded Tools - 1/10/07</description>

       <link>http://www.devarticles.com/c/a/Embedded-Tools/A-New-Toolbar-Can-
    Boost-Your-Web-Site-Traffic-Dramatically</link>

       <comments>http://www.devarticles.com/showblog/32759/A-New-Toolbar-Can-
    Boost-Your-Web-Site-Traffic-Dramatically</comments>

       <guid>http://www.devarticles.com/c/a/Embedded-Tools/A-New-Toolbar-Can-
    Boost-Your-Web-Site-Traffic-Dramatically</guid>

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

    </item>

    <item>

       <title>SteelSound 3H Gaming Headset Review</title>

       <description>Dev Hardware - Peripherals - 1/10/07</description>

       <link>http://www.devhardware.com/c/a/Peripherals/SteelSound-3H-Gaming-
    Headset-Review</link>

       <comments>http://www.devhardware.com/showblog/32760/SteelSound-3H-
    Gaming-Headset-Review</comments>

       <guid>http://www.devhardware.com/c/a/Peripherals/SteelSound-3H-Gaming-
    Headset-Review</guid>

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

    </item>

    </channel>

    </rss>

    Any time that you need to use special characters in your channel elements, they should be html encoded.  You’ll notice my use of the &copy; html entity in my channel’s copyright element.

    Once your have your RSS feed built, stop by feedvalidator.org to make sure that the syntax is valid.  Once it is you can publish it to your website.  Just provide a URL to the location of your rss or xml file for users to add to their news readers.  You can also submit the URL to many listing services.

    That’s all there is to it.  You now have a live RSS feed.  You can add additional items any time that new content becomes available on your site.  Many CMS programs provide RSS creation for you.  There are also a number of third party tools that can be used to generate the channel file for you.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · 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

    - 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
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE







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