2 Replies Latest reply on May 6, 2009 12:23 PM by ntsiii

    Loading XML at Runtime

    sathiyabala Level 1

      With the help of  httpservice we send the request to server and create the xml file in the response we send the filename with fullpath, with the help of the filename we need to load a xml file at runtime.

       

      Our XML File contains nearly 20000 lines of text.

       

      First we tried using String Object, but it says Heap Memory Space Error after that we tried using XML Document Object it also gave same result.

      Is There any way to do this

       

      Code Sample

      // Created HttpService

       

      <mx:HTTPService

       

       

       

       

      id="RootCauseClick" useProxy="false" url="../FlexAction.do?method=onTreeViewLoad" method="POST" fault="faultHandler(event)" result="getRootCause(event)"

      />

       

      // While click we will send the request to Server

       

       

       

      private function showTitle(event:ListEvent):void {

       

       

          RootCauseClick.send(parameters);

       

      }

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      private function getRootCause(response:ResultEvent):void

      {

       

       

       

       

       

       

           // Getting the XML Filename with fullpath   

             var fileName:String = RootCauseClick.lastResult.fileName;

           RootCauseClick.resultFormat = "e4x";

            var myData:XML = response.result.data.DETAILS;

           var xmlListColl:XMLListCollection = new XMLListCollection(xmlList);

       

      mydatagrid.dataProvider = xmlListColl;               

      }

       

       

      mydatagrid.dataProvider = xmlListColl;               

      }

       

       

      mydatagrid.dataProvider = xmlListColl;               

      }