Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: XML::Smart help, how to access attributes?

by toolic (Bishop)
on Jun 01, 2011 at 12:51 UTC ( #907622=note: print w/replies, xml ) Need Help??


in reply to XML::Smart help, how to access attributes?

I'm not sure what your $res->content is, but if I put your XML into a file named file.xml, I get this expected output:
use warnings; use strict; use XML::Smart; my $xml_parser = XML::Smart->new('file.xml') ; print $xml_parser->{feed}->{'openSearch:totalResults'},"\n"; for my $entry (@{$xml_parser->{feed}->{entry}}) { printf('%s - %s%s', $entry->{'title'}, $entry->{'gd:etag'}, "\n"); } __END__ 1 Fitzwilliam Darcy - "Qn04eTVSLyp7ImA9WxRbGEUORAQ."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2019-10-17 18:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?