Flash Widget, Yahoo weather

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=”+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 :slight_smile: