def parse_xform_instance(xml_str, data_dictionary): parser = XFormInstanceParser(xml_str, data_dictionary) return parser.get_flat_dict_with_attributes()