develooper Front page | perl.beginners | Postings from August 2009

Re: Parsing RSS feeds

Thread Previous
From:
Kwame Bahena
Date:
August 4, 2009 02:57
Subject:
Re: Parsing RSS feeds
Message ID:
daniel-504270.21453703082009@cpc2-bror6-0-0-cust974.bmly.cable.ntl.com
When you have some scripts ready, could you share them? Are you doing 
this for a blog?

Best regards,

In article <1233387242.4218.32.camel@ar2.protva-net>,
 drolyk@gmail.com (Roman Makurin) wrote:

> В Сбт, 31/01/2009 в 09:05 +0200, Erez Schatz пишет:
> > On 1/31/2009 8:45 AM, Roman Makurin wrote:
> > > Hi All!
> > >
> > > Which is best way to parse(not create) RSS Feeds(0.9, 1.0 and 2.0) in
> > > perl ? I looked through XML::RSS, but it looks like mostly for creating
> > > feeds.
> > 
> > It's also for parsing them. Try
> > 
> > #!/usr/bin/perl
> > 
> > use strict;
> > use warnings;
> > use XML::RSS;
> > use Data::Dumper;
> > 
> > my $parser = new XML::RSS;
> > my $parsedFeed = $parser -> parse('file.xml');
> > foreach my $item (@{$parsedFeed -> {'items'}) {
> >      print Dumper($item);
> > }
> > 
> > And you'll see the Data-structure you get. (replace "file.xml" with 
> > actual file content, though).
> 
> I asked because I don`t have enough experience in that area. For now I`m
> doing the same things :)
> 
> Thanks

-- 
--
Kwame Bahena

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About