Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: XML::Parser - element data to hash?

by qq (Hermit)
on Dec 21, 2005 at 00:25 UTC ( #518214=note: print w/ replies, xml ) Need Help??


in reply to XML::Parser - element data to hash?

Are you asking for each item in a hash? If so, something like:

my @items = @{$data->{channel}->{item}}; for my $hash ( @items ) { print 'title: ' . $hash->{title}; print 'link: ' . $hash->{link}; print 'desc: ' . $hash->{description}; }

But for RSS, consider one of the many CPAN modules.


Comment on Re: XML::Parser - element data to hash?
Download Code
Re^2: XML::Parser - element data to hash?
by senik148 (Beadle) on Dec 21, 2005 at 17:24 UTC
    Give me some of your brains. :) Thanx to both of you, the code did what i wanted. and i got the output i wanted. Thanx, i gave both of you + points. peace
    ruben r.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-11-26 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls