1 Reply Latest reply on Sep 23, 2010 12:03 AM by Subeesh Arakkan

    Problem in load data from XML in Flex 4

    charlesj1984 Level 1

      Hi Everyone,

       

      I tried all the possible ways which ever i know to load the data from XML to Flash Builder (Flex 4). Actually i want to load the data from XML to Datagrid. The project is executed without any error and warnings but the data is not loaded into datagrid. i will paste the coding below if anyone know the solution please let me know. Waiting for reply.

       

      <?xml version="1.0" encoding="utf-8"?>

       

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

           xmlns:s="library://ns.adobe.com/flex/spark"

           xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="userRequest.send(); ">

       

      <fx:Declarations>

           <s:HTTPService id="userRequest" url="xdata.xml" useProxy="false" resultFormat="e4x" />

      </fx:Declarations>

       

      <mx:DataGrid id="dgUserRequest" x="20" y="160" dataProvider="{userRequest.lastResult.user}" >

           <mx:columns>

                <mx:DataGridColumn headerText="User ID" dataField="id"/>

                <mx:DataGridColumn headerText="User Name" dataField="name"/>

           </mx:columns>

      </mx:DataGrid> 

       

      </s:Application>