develooper Front page | perl.libwww | Postings from April 2001

Re: How do I build a associative array from a dyanamic list

Thread Previous | Thread Next
From:
Gisle Aas
Date:
April 11, 2001 12:42
Subject:
Re: How do I build a associative array from a dyanamic list
Message ID:
lry9t72pha.fsf@caliper.ActiveState.com
"Ben Goswami" <ben.goswami@infospace.com> writes:

> here is the data source which is an xml:
> 
> <response>
> <cart>
> <item><id> = 11</item>
> <item>id = 12</item>
> <item>id = 13</item>
> </cart>
> <shipping></shipping>
> </response>
> 
> I've to build an nested assoicative array
> (like: %response = ( cart-> { item1 => 11,
> 					item2 = 12,
> 					item3 = 13},
> 			   shipping -> ...
> 			);

Check out XML::Simple.  It should come close.

Regards,
Gisle

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About