create_xml_data: fix device and range_mapping