improve get_xml_data