We now use OrderedHashMap instead of HashMap to ensure that attributes on XML elements retain their original order.