Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: data extraction XML::Simple

by ikegami (Pope)
on Mar 10, 2010 at 23:12 UTC ( #827917=note: print w/ replies, xml ) Need Help??


in reply to Re^2: data extraction XML::Simple
in thread data extraction XML::Simple

The dump shows

VAR1 = { 'record' => [ { 'namepairs' => [ { 'brochure' => [ 'My Brochure' ], 'name' => [ 'My Name ' ], 'img' => [ 'My image' ] } ] } ] };

You don't account for the top level hash or any of the arrays.

print $data->{record}[0]{namepairs}[0]{name}[0];


Comment on Re^3: data extraction XML::Simple
Select or Download Code
Re^4: data extraction XML::Simple
by jonnyfolk (Vicar) on Mar 10, 2010 at 23:25 UTC
    Ok, I hadn't understood the difference between the two structures I had posted. It's much clearer to me now. Thanks very much for you help and time.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-10-21 02:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (95 votes), past polls