Package: libxml-rsslite-perl
Version: 0.11-1
Severity: normal
Running "perl foo.pl" on the program below prints
http://foo.org/
http://foo.org/bar.html
where I hoped it would give the second line only.
The link in the item starts with a newline, and I suspect the munging
within rsslite has decided it's text or something so the feed link
should be added. The way rsslite fixes up fields is a good thing, but
in this case I think the fix should be to strip leading whitespace.
I don't know if leading whitespace is valid rss, I saw it in a feed
http://www.coastalwatch.com/rss/cwreports_330.xml
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.22-1-486
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages libxml-rsslite-perl depends on:
ii perl 5.8.8-7 Larry Wall's Practical Extraction
libxml-rsslite-perl recommends no packages.
-- no debconf information
use strict;
use XML::RSSLite;
my %feed;
my $xml = '<?xml version="1.0"?>
<rss version="2.0">
<channel>
<link>http://foo.org</link>
<item>
<link>
http://foo.org/bar.html</link>
</item>
</channel>
</rss>
';
parseRSS(\%feed, \$xml);
print $feed{'item'}->{'link'};