I'm trying to fetch and parse an Atom feed using XML::Atom::Feed and the code below:
#!/usr/bin/perl -w use strict; use XML::Atom::Feed; my $feed = XML::Atom::Feed->new('http://mildlydiverting.blogspot.com/a +tom.xml'); for my $entry ($feed->entries()) { print $entry->title()."\n"; }
This works fine on my local machine, but on my server I get:
Cannot open file 'http://mildlydiverting.blogspot.com/atom.xml' at /home/philg/scripts/extlib/XML/XPath.pm line 53.
It seems that my local machine has LibXML, but the server doesn't. So on the server XML::Atom::Feed is falling back to use XPath instead. But for some reason XPath is being told to fetch the Atom feed from the remote URL, which it isn't designed to do.
My Perl skills aren't sufficient for me to work out where things are going wrong in XML::Atom::Feed, if that's the culprit... any ideas how I can get this working without LibXML? Many thanks.
(FWIW, I was originally trying to debug this problem while using XML::Feed, and tracked the problem back to this point.)
In reply to XML::Atom::Feed with XML::XPath not fetching feed by philgyford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |