View Single Post
  #1 (permalink)  
Old August 13th, 2009, 01:24 PM
geek.shrek geek.shrek is offline
Authorized User
Join Date: Nov 2007
Location: , , .
Posts: 33
Thanks: 2
Thanked 0 Times in 0 Posts
Question XML::Simple parsing xml


First, I'm sorry if this is not the right forum.

I'm trying to parse XML file with XML::Simple in perl.

Here's my input
I would like to get the name of id '1'.

my $LibList = XMLin('library.xml', forcearray=>1, keyattr => ['id']);

my $name = $LibList->{'1'}->{name};
print "Customer id " . $name . "\n";
It doesn't return anything.

Can someone tell me what did I do wrong?

Reply With Quote