
XML::Feed - Syndication feed parser and auto-discovery

use XML::Feed;
my $feed = XML::Feed->parse(URI->new('http://example.com/atom.xml'))
or die XML::Feed->errstr;
print $feed->title, "\n";
for my $entry ($feed->entries) {
}
## Find all of the syndication feeds on a given page, using
## auto-discovery.
my @feeds = XML::Feed->find_feeds('http://example.com/');

XML::Feed is a syndication feed parser for both RSS and Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
XML::Feed supports the following syndication feed formats:
The goal of XML::Feed is to provide a unified API for parsing and using the various syndication formats. The different flavors of RSS and Atom handle data in different ways: date handling; summaries and content; escaping and quoting; etc. This module attempts to remove those differences by providing a wrapper around the formats and the classes implementing those formats (XML::RSS and XML::Atom::Feed). For example, dates are handled differently in each of the above formats. To provide a unified API for date handling, XML::Feed converts all date formats transparently into DateTime objects, which it then returns to the caller.

Creates a new empty XML::Feed object using the format $format.
Parses a syndication feed identified by $stream. $stream can be any one of the following:
A reference to string containing the XML body of the feed.
An open filehandle from which the feed XML will be read.
The name of a file containing the feed XML.
A URI from which the feed XML will be retrieved.
Given a URI $uri, use auto-discovery to find all of the feeds linked from that page (using <link> tags).
Returns a list of feed URIs.
Converts the XML::Feed object into the $format format, and returns the new object.
Splices in all of the entries from the feed $other_feed into $feed, skipping posts that are already in $feed.
Returns the format of the feed (Atom, or some version of RSS).
The title of the feed/channel.
The permalink of the feed/channel.
The description or tagline of the feed/channel.
Alias for $feed->tagline.
The author of the feed/channel.
The language of the feed.
The copyright notice of the feed.
A DateTime object representing the last-modified date of the feed.
If present, $modified should be a DateTime object.
The generator of the feed.
A list of the entries/items in the feed. Returns an array containing XML::Feed::Entry objects.
Adds an entry to the feed. $entry should be an XML::Feed::Entry object in the correct format for the feed.
Returns an XML representation of the feed, in the format determined by the current format of the $feed object.

$XML::Feed::RSS::PREFERRED_PARSERIf you want to use another RSS parser class than XML::RSS (default), you can change the class by setting $PREFERRED_PARSER variable in XML::Feed::RSS package.
$XML::Feed::RSS::PREFERRED_PARSER = "XML::RSS::LibXML";
Note: this will only work for parsing feeds, not creating feeds.

XML::Feed is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Except where otherwise noted, XML::Feed is Copyright 2004-2005 Six Apart, cpan@sixapart.com. All rights reserved.