++ed by:

1 non-PAUSE user.

Daisuke Maki
and 1 contributors

NAME

XML::RSS::LibXML - XML::RSS with XML::LibXML (parse-only)

SYNOPSIS

  use XML::RSS::LibXML;
  my $rss = XML::RSS::LibXML->new;
  $rss->parse_file($file);

  print "channel: $rss->{channel}->{title}\n";
  foreach my $item (@{ $rss->{items} }) {
     print "  item: $item->{title} ($item->{link})\n";
  }

DESCRIPTION

XML::RSS is an extremely handy tool, but it is unfortunately not exactly the most lean or efficient RSS parser, especially in a long-running process. So for a long time I had been using my own version of RSS parser to get the maximum speed and efficiency - this is the re-packaged version of such module, such that it adheres to the XML::RSS interface.

It uses XML::LibXML as the underlying XML parser, and is therefore much much faster than XML::RSS

YMMV, but in reality, I do not parse RSS files this way -- because where performance matters, it is important to *NOT* store unnecessary data in memory. So do note that while this module may achieve what XML::RSS does faster, but it's not the solution.

METHODS

new

Creates a new instance of XML::RSS::LibXML

parse($string)

Parse a string containing RSS.

parsestring($filename)

Parse an RSS file specified by $filename

PERFORMANCE

Here's a simple benchmark using benchmark.pl in this distribution:

  daisuke@localhost XML-RSS-LibXML$ perl -Mlib=lib benchmark.pl index.rdf 
               Rate        rss rss_libxml
  rss        8.00/s         --       -97%
  rss_libxml  262/s      3172%         --

CAVEATS

No support whatsover for writing RSS. No plans to support it either.

TODO

Tests. Currently tests are simply stolen from XML::RSS.

SEE ALSO

XML::RSS, XML::LibXML, XML::LibXML::XPathContext

AUTHOR

Copyright 2005 Daisuke Maki <dmaki@cpan.org>. All rights reserved. Development funded by Brazil, Ltd. <http://b.razil.jp>