1 Reply Latest reply on Jan 18, 2011 10:10 AM by Flex harUI

    Read XML into Array

    capitainequebec

      Hi,

       

           I use the code below to load the content of XML file:

       

      var xmlRequest:URLRequest = new URLRequest("/data/codestravauxpoincon.xml");

       

      var urlLoader:URLLoader = new URLLoader();

       

      urlLoader.addEventListener(Event.COMPLETE, onXMLLoad);

       

      urlLoader.load(xmlRequest);

       

      private function onXMLLoad(event:Event):void{

       

      var myXML:XMLDocument = new XMLDocument();

       

      myXML.ignoreWhite =

      true;

      myXML.parseXML( URLLoader( event.target ).data );

       

       

      trace( myXML.childNodes[0] );

       

      }

       

      It works but now I would like to load the content of myXML to an array.

       

      Regards,

      Daniel Cantin