|Problems? Is your data what you think it is?|
Using RSSby tmitch (Initiate)
|on Feb 17, 2003 at 20:30 UTC||Need Help??|
tmitch has asked for the
wisdom of the Perl Monks concerning the following question:
Hi everyone, I am trying to implement RSS newsfeed on my site. I need to be able to snatch the XML page so that I can parse it and dynamically display the headline and URL on my site.
I have written the parsing function, and it works fine as long as I manually save the XML page to my machine. However (and bear with me, I'm sure this is elementary), I don't know how to save a remote file to a local server for processing. For example, here is what I've tried:
open (SITE, 'http://rss.com.com/2547-12-0-5.xml') or warn "Error opening location " ;
@site = <SITE> ;
close SITE or warn "Can't close location " ;
print @site ;
I'm sure there is a better way to open/save a remote XML page - and in fact, there may be a better way to implement the RSS altogether. Any suggestions would be greatly appreciated.