XML Tutorials
  Home arrow XML Tutorials arrow Page 2 - Creating RSS 2.0 Feeds
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
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 TUTORIALS

Creating RSS 2.0 Feeds
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-04-17

    Table of Contents:
  • Creating RSS 2.0 Feeds
  • guid, Permalink or not
  • Creating RSS 2.0 with PHP
  • Caching and saving

  • 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


    Creating RSS 2.0 Feeds - guid, Permalink or not


    (Page 2 of 4 )

    XML::RSS does support the two guid isPermalink options but in a slightly less predictable way than the other element functions. To set guid isPermalink="true", you should do this:

      $rss->add_item(
          title       => "Example Entry 1",
          link        => http://www.oreilly.com/example/entry1,
          description => 'blah blah',
          permaLink   => http://www.oreilly.com/example/entry1,
      );

    However, to set guid isPermalink="false", you should do this:

      $rss->add_item(
          title       => "Example Entry 1",
          link        => http://www.oreilly.com/example/entry1,
          description => 'blah blah',
          guid        => http://www.example.com/guidsRus/348324327,
      );

    Module support under XML::RSS

    As you can see, XML::RSS always includes the namespace declaration for the blogChannel module. You can also use it to include other modules within your feed.

    In Example 4-4, we passed known strings to the module. It's really not of much use as a script; you need to add a more dynamic form of data, or the feed will be very boring indeed. We do an awful lot of this sort of thing in Chapter 10, so let's leave Perl until then, and move on to another language.

    More XML Tutorials Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Developing Feeds with RSS and Atom,"...
     

    Buy this book now. This article is excerpted from chapter four of the book Developing Feeds with RSS and Atom, written by Ben Hammersley (O'Reilly; ISBN: 0596008813). Check it out today at your favorite bookstore. Buy this book now.

    XML TUTORIALS ARTICLES

    - Validation with Document Type Definitions (D...
    - Creating a Well-Formed XML Document
    - Creating XML Taxonomies
    - Getting to Know XML
    - A Friendly Approach to XML
    - Creating RSS 2.0 Feeds
    - Using Modules in Your RSS Feed
    - RSS 2.0
    - Querying XML: Use Cases
    - Joins and Query Use with XML
    - Solving Problems by Querying XML
    - Performing Set Operations When Querying XML
    - Querying XML
    - Handling Data for Ajax with JSON
    - Handling XML Data for Ajax





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