The Wabe Index of Software Packages XML::LibXML::Document::RSS


NAME

XML::LibXML::Document::RSS - RDF Site Syndication

SYNOPSIS

use XML::LibXML::Document::RSS;

$document = new XML::LibXML::Document::RSS 'http://my.dot.com/';
$document->addItem('Item #1 Title', 'http://my.dot.com/item1/',
  'Hello. This is a summary of Item #1.');
    

DESCRIPTION

This module presents a number of convenience functions for XML::LibXML to generate and edit RSS documents.

CONSTANTS

Constants are not exported but may be used for methods that require a namespace URI.

RDF_NAMESPACE
RSS_NAMESPACE
URIs for the Resource Description Framework (RDF) and RDF Site Summary (RSS) namespaces, respectively.

METHODS

XML::LibXML::Document::RSS is a subclass of XML::LibXML::Document and inherits all of its methods but overrides none.

new XML::LibXML::Document::RSS ( TITLE, LINK, DESCRIPTION, ... ])
Creates an instance of an XML::LibXML::Document::RSS object, which is an XML::LibXML::Document object with additional convenience methods for adding items, images, and textinput elements.

The TITLE, LINK, and DESCRIPTION parameters are placed in the manditory elements of the same name. Any additional parameters are passed onto the constructor for an XML::LibXML::Document object.

$rss -> setChannelTitle ( TEXT )
$rss -> setChannelLink ( TEXT )
$rss -> setChannelDescription ( TEXT )
Sets the title, link, and description subelements of the channel element.
$rss -> channelTitle ( TEXT )
$rss -> channelLink ( TEXT )
$rss -> channelDescription ( TEXT )
Convenience functions to return the element values.
$rss -> setItem ( TITLE, LINK, DESCRIPTION )
Creates or updates an RSS item with the information provided.

Note that RDF insists that there is at most one item per document with an 'about' attribute of any given value. If you call setItem with a LINK that is already in the document, the corresponding item is replaced.

$rss -> setImage ( TITLE, URL, LINK )
Creates or updates an RSS image with the information provided. Note that the URL parameter is the URL for the image, and the LINK parameter is where clicking on the image should take the user.
$rss -> setTextInput ( TITLE, DESCRIPTION, NAME, LINK )
Creates or updates an RSS textinput with the information provided.

EXPORTS

None by default.

EXAMPLE

my $rss = new XML::LibXML::Document::RSS
  'My RSS Feed',
  'http://my.dot.com/rss.xml',
  'This is the feed my company provides so that people may see that ' .
  'we don\'t update frequently.';

# It's not a legal RSS document unless it has at least one item...

setItem $rss
  'This is item #1',
  'http://my.dot.com/item1.html',
  'Item #1 is about stuff.';

print $rss->toString;
    

HISTORY

$Log: RSS.pm,v $
Revision 1.0  2003/01/31 00:58:42  rgm
Initial revision
    

AUTHOR

Rob Menke, rgm@the-wabe.com

SEE ALSO

http://purl.org/rss/1.0/spec

the XML::LibXML manpage, the XML::LibXML::Document::RSS::Syndication manpage, perl(1).

Last Modified: 2003/12/09 04:13:38 GMT
(Send problems to Rob Menke)
Page style: Classic | Cyan | Dark