http://A6357896562.api.wxbug.net/getForecastRSS.aspx?ACode=A6357896562&OutputType=1&zipCode=48189.
This returns the following data:
After I get the data it is time for parsing. I use the SimpleXML Xpath function to get the data into a searchable variable.
$xml = new SimpleXMLElement($data);
Then I simply create a for loop to iterate through the data and diplay the results in HTML format. Since there are HTML tags I can't cut and paste the text into the blog as it tries to interpret the tags. However, I have put up a screenshot of the for loop and the methods used to optain the XML tag info HERE.
Here is the final output:
Thats good work, I'd love to use that for my group project. Something simple that gives us an idea of what the weather will be when our guest arrive.
ReplyDeleteIs it possible to have a future view also, like by the month?
I had wondered how you did that. I thought it was a very nice touch to your site. I am still struggling with my Tea blog. I will try your way next to see if that works.
ReplyDelete