[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: Parsing RSS feeds
From:       Roman Makurin <drolyk () gmail ! com>
Date:       2009-01-31 7:34:02
Message-ID: 1233387242.4218.32.camel () ar2 ! protva-net
[Download RAW message or body]

В Сбт, 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


-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic