modified function xml_array.