title: Adobe Air as3 - Read XML file from desktop
body: <p>How can I read an xml file located on user's desktop? I've tried this:</p>
  
  <pre><code>import flash.events.Event;
  import flash.net.URLLoader;
  
  var myXML:XML = new XML();
  var myLoader:URLLoader = new URLLoader(new URLRequest(File.desktopDirectory.nativePath + "/a.xml"));
  myLoader.addEventListener(Event.COMPLETE, xmlLoaded);
  
  function xmlLoaded(event:Event):void
  {
      myXML = XML(myLoader.data);
      trace(myXML);       
  }
  </code></pre>
  
  <p>but it doesn't work.</p>