in reply to hash XML rounding trip

that was it thanks. it produces
<g> <element> <high>1</high> <percent>10</percent> <low>1</low> <select>armor</select> </element> <element> <high>1</high> <percent>10</percent> <low>1</low> <select>weapon</select> </element> </g>
now to test the reading back into the structure.

Replies are listed 'Best First'.
Re^2: hash XML rounding trip
by arcnon (Monk) on Aug 27, 2004 at 14:54 UTC
    you say that it is almost the same but it produces total differant code. the above correct code(yours) and the 'g' => 'select' (mine) which created
    <g> <select> <high>3</high> <low>3</low> <percent>30</percent> <select>any</select> </select> </g>
    from the shown hash. Where g contains 2 array items. Why do you say they are the almost same? when they output so radically differant? I dont understand.
      The XML::Simple documentation suggests that you shouldn't use a childnode name as the name for the array elements. I suspect that may have something to do with it.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      I shouldn't have to say this, but any code, unless otherwise stated, is untested