Subject: | parsing of rss 2.0 skipDays and skipHours |
Date: | Mon, 17 Nov 2008 10:09:50 +1100 |
To: | bug-XML-RSS [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
The 2.0 sample feed
http://www.rssboard.org/files/rss-2.0-sample.xml
parsed by XML::RSS with the program below gives
'skipHours' => {
'hour' => '0122223',
'skipHours' => '
'
},
'skipDays' => {
'day' => 'SaturdaySunday',
'skipDays' => '
'
},
where I hoped for an array or something for the multiple hours or days
under those parts, with a view to passing them to XML::RSS::Timing.
Concatenating in the hours in particular makes the result there
ambiguous of course.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
my $xml = get('http://www.rssboard.org/files/rss-2.0-sample.xml');
use XML::RSS;
my $feed = XML::RSS->new;
$feed->parse($xml);
use Data::Dumper;
print Dumper($feed);