Reputation: 9
Ive been hunting around but am struggling with this, I trying to get the 5 day forecast from the yahoo weather xml, im trying to pick the data below:
/description>
yweather:forecast day="Thu" date="27 Jun 2013" low="51" high="60" text="Partly Cloudy" code="29"/>
yweather:forecast day="Fri" date="28 Jun 2013" low="45" high="59" text="Rain" code="12"/>
yweather:forecast day="Sat" date="29 Jun 2013" low="52" high="58" text="Mostly Cloudy" code="28"/>
yweather:forecast day="Sun" date="30 Jun 2013" low="49" high="62" text="PM Showers" code="39"/>
yweather:forecast day="Mon" date="1 Jul 2013" low="48" high="61" text="Partly Cloudy" code="30"/>
I can get the data from the first line,yweather:forecast day="thu" date="27 jun 2013 ..........
but I cant figure out how to get data from any of the other lines, day="fri", sat, sun
any help is much appreciated
cheers
Upvotes: 0
Views: 2333
Reputation: 1603
Maybe you can try with an API with a sweet JSON response?
I would recommend Metwit weather API.
It's an easy to use fully REST API and it's free to use for many reasonable uses.
Take a look here: http://soup.metwit.com/post/47181933854/an-alternative-to-yahoo-weather-api
Last but not least, you can implement them client-side: 200 request/day (ip based throttling) no authentication required.
The free usage limit is set at 200 requests per IP, each one of your visitors can make request up to 200 times a day!
(Full disclosure: I am a founder of Metwit. Feel free to ask me for further details)
Upvotes: 1