XML-Simple - Re: Need Help with ForceArray

Posted on Thu Mar 6 21:38:45 2008 by grantm in response to 7280 (See the whole thread of 2)
Re: Need Help with ForceArray

XML::Simple represents one XML element as a hash. If you have two elements with the same XML tag name then they will be represented as an array of hashes. 'Folding' refers to transforming the array of hashes into a hash of hashes where the hash key is the value of a common attribute. In your example XML (which is badly malformed), the item elements do not all have a common 'name' - some have name and some have exec.

I suggest you read this article and if you have further problems, ask on PerlMonks rather than on this site.

http://www.perlmonks.org/index.pl?node_id=218480

Write a response