Help with mvc and xmllist - null values

I’m trying to load a xml file into my model class. I am loading it with a load class definied in the model.

I am calling the load class from the document class. If i then try to trace the object and the xml varibale I get a NULL value.

Any help would be great…

model


package  
{

    import flash.events.EventDispatcher;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    
    /**
     * ...
     * @author 
     */
    public class Photo extends EventDispatcher
    {
        
        private var xmlLoader:URLLoader; 
        private var totalImages:uint; 
        private var currentIndex:int = 0; 
        public var xml:XML;
        private var _file:String;
        public var xname:String;
        
        
        public function Photo() 
        {
            xmlLoader = new URLLoader(); 
            
        
        }
        
        public function load(url:URLRequest):void {
            xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded); 
            xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, errorLoading); 
            xmlLoader.load(url); 
            
        }
        
        private function xmlLoaded(event:Event):void {  // after the xml file is loaded, 
    
            xml = new XML(xmlLoader.data); 
            xname = "test";
    
        }
        
        private function errorLoading(error:IOErrorEvent) {
            trace("No/Wrong XML file specified"); 
        }
        
        public function get file():String {
             return "hi";
        }
        
            

    
        
    }
    
}

document


package  
{
    
    import flash.display.Sprite;
    import flash.events.*;
    import flash.net.URLRequest;
    
    /**
     * ...
     * @author 
     */
    public class Document extends Sprite
    {
        var photo:Photo;
        var view:View; 
        
        public function Document() 
        {
                photo = new Photo(); 
                photo.load(new URLRequest("images.xml"));
                
                
                trace(photo.xml);
                // view = new View(photo); 
                
                
        }
        
    
        
    }
    
}