benn600 Posted February 20, 2009 Share Posted February 20, 2009 I've spent a lot of time trying to find an appropriate XML parser for PHP that I can get to work as I need. The developer info is here: http://developer.yahoo.com/weather/ and the feed is here: http://weather.yahooapis.com/forecastrss?p=52402 The main piece I want to extract is: <yweather:condition text="Mostly Cloudy" code="26" temp="57" date="Tue, 29 Nov 2005 3:56 pm PST"></yweather:condition> -- specifically, the code="26" piece. With this code, I can read from the array of codes and print the condition--and also print an image with the info. I was using SimpleXML but it does not include the "yweather:" branches or the internal attributes. How do I access these? I'd like to add this weather to my personal homepage site. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.