Gekitsuu has asked for the wisdom of the Perl Monks concerning the following question:
When I run it I get an error of "File name too long at ./rsscap line 13". How do I fix my code so I don't have to save the result out to a file before I parse it?#!/usr/bin/perl use strict; use LWP::UserAgent; use XML::RSS::Parser; my $agent = LWP::UserAgent->new; my $RSS = $agent->get( 'http://feeds.feedburner.com/BicyclemarksCommun +ique' ); my $rssresult = $RSS->content(); my $p = new XML::RSS::Parser; my $feed = $p->parsefile( $rssresult ); # output some values my $title = XML::RSS::Parser->ns_qualify('title',$feed->rss_namespace_ +uri); print $feed->channel->children($title)->value."\n"; print "item count: ".$feed->item_count()."\n\n"; foreach my $i ( $feed->items ) { map { print $_->name.": ".$_->value."\n" } $i->children; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RSS Parser
by jasonk (Parson) on May 28, 2005 at 05:31 UTC | |
|
Re: RSS Parser
by brian_d_foy (Abbot) on May 28, 2005 at 05:31 UTC |