sub add_entry;
sub entries;
sub as_xml;
+sub id;
sub tagline { shift->description(@_) }
sub items { $_[0]->entries }
Creates a new empty I<XML::Feed> object using the format I<$format>.
+ $feed = XML::Feed->new('Atom');
+ $feed = XML::Feed->new('RSS');
+ $feed = XML::Feed->new('RSS', version => '0.91');
+
=head2 XML::Feed->parse($stream)
=head2 XML::Feed->parse($stream, $format)
eval "use $PREFERRED_PARSER"; die $@ if $@;
$feed->{rss} = $PREFERRED_PARSER->new(%args);
$feed->{rss}->add_module(prefix => "content", uri => 'http://purl.org/rss/1.0/modules/content/');
- if ($args{'version'} >= 2.0) {
- $feed->{rss}->add_module(prefix => "dcterms", uri => 'http://purl.org/dc/terms/');
- } else {
- $feed->{rss}->add_module(prefix => "dcterms", uri => 'http://purl.org/rss/1.0/modules/dcterms/');
- }
+ $feed->{rss}->add_module(prefix => "dcterms", uri => 'http://purl.org/dc/terms/');
$feed;
}
sub link { shift->{rss}->channel('link', @_) }
sub description { shift->{rss}->channel('description', @_) }
+# This doesn't exist in RSS
+sub id { }
+
## This is RSS 2.0 only--what's the equivalent in RSS 1.0?
sub copyright { shift->{rss}->channel('copyright', @_) }