Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Converting RSS file to HTML

by Hero Zzyzzx (Curate)
on Mar 27, 2004 at 04:21 UTC ( #340215=note: print w/ replies, xml ) Need Help??


in reply to Converting RSS file to HTML

Don't do this manually. Someone has already done the work for you and put it on www.cpan.org in the form of XML::RSS.

#!/usr/bin/perl #Almost exactly from the docs. use XML::RSS; my $rss=XML::RSS->new(); $rss->parse($your_rss_feed_in_this_scalar); foreach my $item (@{$rss->{'items'}}) { print "title: $item->{'title'}\n"; print "link: $item->{'link'}\n\n"; print "description: $item->{'description'}\n\n"; }

I'll leave the HTML bit as an exercise to the reader. . .

-Any sufficiently advanced technology is
indistinguishable from doubletalk.

My Biz


Comment on Re: Converting RSS file to HTML
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://340215]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-08-01 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (258 votes), past polls