Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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
Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2015-11-28 10:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (741 votes), past polls