in reply to XML::Simple element handling

I am not able to forcearray the .server. element unless I change the case of the .name.

XML::Simple treats elements or attributes named 'name', 'key' or 'id' in a special way by default. You would use the KeyAttr option to tell it not to, as explained in the documentation.

In your case, the ForceArray is working correctly, but array folding happens next and turns the array into a hash keyed on 'name'. If you don't want that then just turn off array folding.

This node may make that a bit clearer.

Replies are listed 'Best First'.
Re^2: XML::Simple element handling
by Anonymous Monk on May 12, 2006 at 13:29 UTC
    thanks for the data. keyattr was the problem. as always, rtfm