Bug#477394: missing ability to specify feed type

gregor herrmann gregoa at debian.org
Fri May 2 12:48:18 UTC 2008


severity 477394 wishlist
tag 477394 + upstream
thanks

On Tue, 29 Apr 2008 14:22:00 +0200, martin f krafft wrote:

> Given how libxml-feed-perl determines the feed type, though, I would
> say it'd be a good idea to allow me to tell the library how to
> interpret the contents at a URL I give it.

The following seems to work (using convert()):

#v+

#!/usr/bin/perl -w

use strict;
use XML::Feed;

my $feed = XML::Feed->parse(URI->new('http://blog.jroes.net/feeds/posts/default/-/netconf'))
	or die XML::Feed->errstr;

print "Feed format: ", $feed->format, "\n";
my $newfeed = $feed->convert('RSS');
print "Newfeed format: ", $newfeed->format, "\n";

print "Feed title: ", $newfeed->title, "\n";
print "Feed URL: ", $newfeed->link, "\n";

for my $entry ($newfeed->entries) {
	print "Entry title: ", $entry->title, "\n";
	print "Entry content: ", $entry->content->body, "\n\n";
}
 
#v-

But I agree that a $format parameter for the parse() function might
be useful. I'll pass the request on to upstream.

Cheers,
gregor
-- 
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  debian gnu/linux user, admin & developer - http://www.debian.org/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    NP: Nirvana: Smells Like Teen Spirit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080502/2b578438/attachment.pgp 


More information about the pkg-perl-maintainers mailing list