4 Replies Latest reply on Aug 25, 2009 2:04 PM by sreeflex

    Read XLIM File in flex



              Can anybody show me a way to read a xlim or xsl-fo file in flex.  Appreciate your help.


      Thanks in advance



        • 1. Re: Read XLIM File in flex
          nagasreekrishna Level 1

          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="load()">



                  public var xmlLoader:URLLoader=new URLLoader();


          function load():void{
                      var xmlString:URLRequest = new URLRequest("items.xml");


             function init(event:Event):void{
                 var xDoc:XMLDocument = new XMLDocument();
              xDoc.ignoreWhite = true;
             var  myXML:XML=XML(xmlLoader.data);  

             var fr:String=myXML.items.item[0].Value.toString();







          Suppose this is ur items.xml file

















          May be u need some imports


          Then the output will be :high(becoz items is  a xml list containing many xml nodes...item[0] is first xml node and Value is the element..toString methods converts it into a string)

          1 person found this helpful
          • 2. Re: Read XLIM File in flex
            sreeflex Level 1

            Thanks for the reply. But i want to read data from XLIM  or XSL-FO  file. Not from the XML file. Appreaciate your responce.

            • 3. Re: Read XLIM File in flex
              Barna Biro Level 3

              Same thing. If my memory is not playing tricks on me then XLIM and XLS-FO are also XML structures but with different formatting ( XLS-FO using some namespaces ). Since that's the case, you can always read in any text file ( the format doesn't really matter - what only would matter is the data structure... you'll be easier off with XML-like structures because Flash/Flex can handle that quite well, but if you would be trying to parse plain text... well, that wouldn't be a piece of cake ) and decide to do whatever you want with the content afterward.


              So, just simply try to load the XLS-FO file as you'd load an XML file. You should be able to parse it as any other XML file ( just pay attention to the namespaces when parsing the structure ).

              • 4. Re: Read XLIM File in flex
                sreeflex Level 1

                Thank you very much.I will try this way