Question

I was wondering if there is a way to find the weather of specific town/city using Java. I have heard of Google Weather API but that has not yielded any results. I also have heard about using an .xml feed for finding the weather but where can I find that? Therefore, I have two questions, Is there a way to find the weather to find using Java and am I correct about the .xml?

Was it helpful?

Solution

The Google Weather API appears to be no more:

http://thenextweb.com/google/2012/08/28/did-google-just-quietly-kill-private-weather-api/

But you can use others such as

http://www.wunderground.com/weather/api/

Once you have your XML (or JSON) you can parse it as described here:

Using Java to extract data from google Weather API

OTHER TIPS

you can use openweathermap api for this. Go to this link and download api and you can also see some examples to use it http://openweathermap.org/api

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top