Added getArrayType().
fixed bugs in XML encoding/decoding for Arrays and Objects