Hello all,
Firstly, my appologies for the poorly worded subject
I'm using XML::RSS to parse a Flickr rss photo feed, this kind of works. I can access normal elements (title, url etc..) however elements with a namespace (in this case, media) I'm having problems with. I have the following:
my $rss = XML::RSS->new();
my $data = get( $url );
$rss->parse( $data );
$rss->add_module(prefix=>'media', uri=>'http://search.yahoo.com/mrss/');
my $channel = $rss->{channel};
my $image = $rss->{image};
foreach my $item ( @{ $rss->{items} } )
{
print qq|<a href="$$item{link}">$$item{title}</a><br /><br />\n|;
my $tempmedia = $$item{content};
print qq|$$tempmedia->{url}\n|;
}
So, i'm trying to access the following:
<item>
<title>Fireworks 4</title>
<link>http://www.flickr.com/photos/davehope/293811368/</link>
<media:content url="http://farm1.static.flickr.com/113/293811368_f1e2c2d45a_o.png" type="image/jpe
+g" height="678" width="848" />
</item>
Accessing title and link works fine, how do I go about accessing media:content url for example?
Thanks guys. Hope you're all having a nice Christmas break,
Dave