Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: XML::Simple help

by graff (Chancellor)
on Mar 08, 2005 at 03:38 UTC ( #437395=note: print w/replies, xml ) Need Help??

in reply to XML::Simple help

Looking at the man page for XML::Simple, it looks like the "ValueAttr" option does not really fit with the data that you have. It looks like this option is intended for cases where lots of different elements have a common attribute, and you want to have this parsed into a structure where the element names are hash keys and the values of the common attribute are hash values.

In your case, you have a lot of instances with the same element name and two common attributes, where one attribute serves as a "key" field (unique to each instance of the element) and the other does not; in this case, the "KeyAttr" option works well, and there simply isn't anything else that the module can do for you. The initial reply above is the way to go to get what you want.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2023-03-30 23:39 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (74 votes). Check out past polls.