def __parse_ws_data(content, latitude=<NUM_LIT>, longitude=<NUM_LIT>):
log.info("<STR_LIT>", latitude, longitude)<EOL>result = {SUCCESS: False, MESSAGE: None, DATA: None}<EOL>try:<EOL><INDENT>xmldata = xmltodict.parse(content)[__BRROOT]<EOL><DEDENT>except (xmltodict.expat.ExpatError, KeyError):<EOL><INDENT>result[MESSAGE] = "<STR_LIT>"<EOL>log.exception(result[MESSAGE])<EOL>return result<EOL><DEDENT>loc_data = __select_nearest_ws(xmldata, latitude, longitude)<EOL>if not loc_data:<EOL><INDENT>result[MESSAGE] = '<STR_LIT>'<EOL>return result<EOL><DEDENT>if not __is_valid(loc_data):<EOL><INDENT>result[MESSAGE] = '<STR_LIT>'<EOL>return result<EOL><DEDENT>log.debug("<STR_LIT>", loc_data)<EOL>result[DISTANCE] = __get_ws_distance(loc_data, latitude, longitude)<EOL>result = __parse_loc_data(loc_data, result)<EOL>try:<EOL><INDENT>fc_data = xmldata[__BRWEERGEGEVENS][__BRVERWACHTING]<EOL><DEDENT>except (xmltodict.expat.ExpatError, KeyError):<EOL><INDENT>result[MESSAGE] = '<STR_LIT>'<EOL>log.exception(result[MESSAGE])<EOL>return result<EOL><DEDENT>if fc_data:<EOL><INDENT>log.debug("<STR_LIT>", fc_data)<EOL>result[DATA][FORECAST] = __parse_fc_data(fc_data)<EOL><DEDENT>return result<EOL>
Parse the buienradar xml and rain data.