Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [KevM] RSS feed plugin request: Edit Log

Here is the list of edits for this post
Re: [KevM] RSS feed plugin request
Here's an example to get you going:

sub {
use XML::Simple qw(:strict);
my $Request = "http://newsrss.bbc.co.uk/...ngland/essex/rss.xml";
my $response = get($Request);
die "Request failed\n" unless defined($response);
my $ref=XMLin($response,forcearray => [qw()],keyattr=>[]);
return {News_Hash=>$ref->{channel}};
}

Then in your templates you should be able to use something like

<%globalname%>
<%loop News_Hash.item%>
<%title%>: <%description%>
<%endloop%>

Last edited by:

afinlr: Mar 15, 2006, 12:16 PM

Edit Log: