Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-04 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls