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


NAME

XML::LibXML::Document::RSS::Syndication - RSS Syndication module

SYNOPSIS

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

DESCRIPTION

This perl module presents a number of additional methods for the XML::LibXML::Document::RSS perl module. It is a class category rather than a full-fledged class.

CONSTANTS

Constants are not exported but may be used for methods that require a namespace URI. Note that these constants are placed in the XML::LibXML::Document::RSS package.

SYN_NAMESPACE
URI for the RSS Syndication Module (SYN) namespace.

METHODS

XML::LibXML::Document::RSS::Syndication is a class category for XML::LibXML::Document::RSS and offers no methods of its own. The following methods are in the XML::LibXML::Document::RSS package.

$rss -> setUpdatePeriod ( PERIOD )
Sets the update period. Legal values are according to the Syndication module specification: hourly, daily, weekly, monthly, yearly.
$rss -> setUpdateFrequency ( FREQUENCY )
Sets the update frequency with respect to the update period. A positive integer.
$rss -> setUpdateBase ( BASE )
The base time used to calculate the publishing schedule, in W3CDTF (http://www.w3.org/TR/NOTE-datetime).

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.';

$rss->setUpdatePeriod('daily');
$rss->setUpdateFrequency(2);
$rss->setUpdateBase('2000-01-01T12:05+00:00');

print $rss->toString;
    

CAVEAT

All of the methods added by XML::LibXML::Document::RSS::Syndication append new elements to the end of the channel element; other modules may follow this convention as well. Mixing calls to RSS modules may produce scrambled (but technically legal) RSS documents. The current specification (as of 2000-12-20) does not specify where within the channel these elements belong, although the examples shown place them before the items element. If this breaks any existing aggregators, please notify the author of the aggregator and this perl module.

HISTORY

$Log: Syndication.pm,v $
Revision 1.0  2003/01/31 00:59:05  rgm
Initial revision
    

AUTHOR

Rob Menke, rgm@the-wabe.com

SEE ALSO

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

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