static Map<S, Int> openWeatherMap_maxTempForecast(S cityName) { S url = "http://api.openweathermap.org/data/2.5/forecast"; S xml = loadPageWithParams(url, APPID := openWeatherMapAPIKey(), q := cityName, mode := "xml"); new TreeMap<S, Int> maxPerDay; for (L<S> tTime : findContainerOrEmptyTag(xml, "time")) { S from = tagParam(tTime, "from"); S day = takeFirst(from, lastIndexOf(from, "T")); L<S> tTemperature = first(findContainerOrEmptyTag(tTime, "temperature")); int maxTemp = iround(kelvinToCelsius(parseDouble(tagParam(tTemperature, "max")))); maxPerDay.put(day, max(maxTemp, toInt(maxPerDay.get(day)))); } ret maxPerDay; }