in reply to How do I parse XML with repeating attribute values?

"name" isn't a key, so tell XML::Simple it isn't.

KeyAttr => []

Arguably this isn't well-formed XML

I don't think so. I don't know of any constraint on the value of fields named "name".

Replies are listed 'Best First'.
Re^2: How do I parse XML with repeating attribute values?
by 1arryb (Acolyte) on Dec 12, 2011 at 19:07 UTC

    ikegami,

    Thanks, you are quite correct. I was screwed up by the rather too cute default value for KeyAttr. From the XML::Simple perldoc:

    Note 1: The default value for 'KeyAttr' is 'name', 'key', 'id'.

    (Note to self: I will read the manual. I will read the manual. I will RTFM ...)

    Larry
      I don't blame you. It's a bad default.