# Flash Widget, Yahoo weather

**URL:** <https://forum.kirupa.com/t/flash-widget-yahoo-weather/287772>\
**Category:** flash\
**Created:** [May 6, 2009, 3:32am UTC](https://forum.kirupa.com/t/flash-widget-yahoo-weather/287772 "2009-05-06T03:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [May 6, 2009, 3:32am UTC](https://forum.kirupa.com/t/flash-widget-yahoo-weather/287772/1 "2009-05-06T03:32:37Z")

</div>

HI

I am trying to make a flash widget using yahoo weather API. Since it uses RSS I thought it was simples but I am stuck. I just don’t know how to extract info inside this xml line:

\<yweather:units temperature=“C” distance=“km” pressure=“mb” speed=“kph”/\>

my complete code is:

var location\_id:String=‘POXX0022’;  
var grades:String=‘c’;  
var url:String=“[http://weather.yahooapis.com/forecastrss?p="+location\_id+"&u=](http://weather.yahooapis.com/forecastrss?p=%22+location_id+%22&u=)”+grades;

var xmlLoader:URLLoader = new URLLoader();  
var xmlData:XML = new XML();

xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

xmlLoader.load(new URLRequest(url));

function LoadXML(e:Event):void {  
xmlData = new XML(e.target.data);  
ParseRSSNews(xmlData);  
}

function ParseRSSNews(rssNewsInput:XML):void {  
trace(“XML Output”);  
trace("------------------------");  
trace(rssNewsInput.channel);  
trace("------------------------");  
trace(rssNewsInput.channel.description);  
trace("------------------------");  
// this is the line that traces NOTHING  
trace(rssNewsInput.channel.units);

}

I hope someone can help me 🙂
