Using XML

Hey,

I’m trying to load some XML and then use it to setup some constants to use elsewhere but really don’t know how to access the XML once it is loaded.


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

xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

xmlLoader.load(new URLRequest('SelectorConstants.xml'));

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

This loads my xml fine and I can trace it within the LoadXML function. However, I have no idea how to do anything useful with it - such as assign various parts to constants. How can I access xmlData elsewhere?

I would be really grateful if anyone can point me in the right direction here.

Thanks. Allie