Weather RSS xmlns definition

Hello there,

I'm working on a weather display for my site, and as part of it, I was going to pull some data from the Yahoo! Weather RSS feed.

The page here:


In the feed I get going to http://weather.yahooapis.com/forecastrss?p=76201, the definition for the yweather namespace seems to go nowhere.

<rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">

In fact, if I attempt to go to the xmlns:yweather url, I receive a 404 not found. I assume this is the issue, because if I do a parse of the doc using the DOM:

$xmlDoc = new DOMDocument();

$x = $xmlDoc->documentElement;
foreach ($x->childNodes AS $item)
print $item->nodeName . " = " . $item->nodeValue . "<br />";

The yweather tags are simply ignored, while the other defined xmlns (geo) is spit out like normal.

I wasn't sure where to post this, as it is both an issue with the documentation (which says the xmlns should use http://weather.yahooapis.com/ns/rss/1.0, completely different from what the feed spits out), and an issue with the feed itself, apparently.


0 Replies
This forum is locked.

Recent Posts

in YDN Documentation