1 Reply Latest reply on Sep 2, 2009 12:06 PM by leybniz

    fileRefrence and XML

    Revlex

      Hi all,

       

      I'm building an application that generates XML files automatically and save it on the clients desktop wich is already working.

      Now im trying to load the xml wich i generated with fileRefrence thats wath i succeded with but now i need to extract the data from it and thats the problem. so my question is: How can i extract the data from that loaded xml file? wich is on the clients desktop. this is my code.

       

              private var the_image:FileReference = new FileReference();
              private var the_image_2:FileReference = new FileReference();
              private var the_image_3:FileReference = new FileReference();
              private var the_image_4:FileReference = new FileReference();
             
              private var xml_savo:FileReference = new FileReference();
              private var xml_load:FileReference = new FileReference();
              private var new_xml:XML = new XML();
              private var old_xml:XML = new XML();
             
              private var filter:TextFilter = new TextFilter();
             
              private function load_xml(e:MouseEvent):void
              {
                  var xml_array:Array = [];
                  xml_array.push(new FileFilter("xml", "*.xml;"));
                  xml_load.browse(xml_array);
                  xml_load.addEventListener(Event.SELECT, xml_loader);
              }
             
              private function xml_loader(e:Event):void
              {
                  xml_load.load();
                  xml_load.addEventListener(Event.COMPLETE, xml_open);
              }
              private function xml_open(e:Event):void
              {
                  var loaded_xml:XMLUtil = new XMLUtil();
              }