Click to See Complete Forum and Search --> : another annoying xml newbie..


tonypickle
02-03-2010, 10:45 AM
http://forecast.weather.gov/MapClick.php?CityName=New+York&state=NY&site=OKX&textField1=40.7198&textField2=-73.993

I would love to display the first 5 blocks of the "forecast at a glance" onto a website with only the simple information that's already there (the day, % chance of precipitation, type of precip, and temp., and the little image would be great too) If this isn't possible,then just the date, high temp, low temp, and precip would be fine.

the xml for this page is here:
http://forecast.weather.gov/MapClick.php?lat=40.71980&lon=-73.99300&FcstType=dwml

now i'm sure this has been asked a million times but for some reason i can't find a very simplified tutorial on how to do this. can someone steer me in the right direction?

**doing this with php would be preferable

thanks for dealing with another annoying xml newbie!!

Mr Initial Man
02-03-2010, 05:25 PM
Okay... What elements are you after? I assure you this is doable.

tonypickle
02-03-2010, 05:36 PM
the day, % chance of precipitation, type of precip, and temp., and the little image would be great too

tonypickle
02-05-2010, 09:18 AM
*location --> location-key --> description
*time-layout --> time-coordinate --> start-valid-time (which I would love to only have the first 4 entries such as today, tonight, tomorrow, and tomorrow nights information)
*the 4 values for "Daily Maximum Temperature"
*the 4 values for "Daily Minimum Temperature"
*the 4 values for 12 Hourly "Probability of Precipitation"
*the "weather-conditions"
*and the associated "icon-link" image for each

Mr Initial Man
02-05-2010, 10:01 AM
What you can use is PHP DomDocument.

When you use The GetElementsByTagName method, you'll get a list of elements. Then you just use which elements you need from there.