THank You Jagadish:)

On Apr 28, 7:48 am, Jagadish M <[email protected]> wrote:
> *1.xml*
>
> <employeeDB>
>     <tblEmpDetails>
>         <empdetails>
>                  <empId>1001</empId>
>                  <empname>J</empname>
>                  <empsalary>10000</empsalary>
>                  <empgender>Male</empgender>
>         </empdetails>
>         <empdetails>
>                  <empId>1002</empId>
>                  <empname>Ja</empname>
>                  <empsalary>20000</empsalary>
>                  <empgender>Male</empgender>
>          </empdetails>
>          <empdetails>
>                  <empId>1003</empId>
>                 <empname>Jag</empname>
>                 <empsalary>30000</empsalary>
>                 <empgender>Male</empgender>
>          </empdetails>
>          <empdetails>
>                  <empId>1004</empId>
>                  <empname>Jaga</empname>
>                  <empsalary>60000</empsalary>
>                  <empgender>FeMale</empgender>
>             </empdetails>
>          <empdetails>
>                  <empId>1004</empId>
>                  <empname>Jagan</empname>
>                  <empsalary>65000</empsalary>
>                  <empgender>FeMale</empgender>
>             </empdetails>
>        </tblEmpDetails>
>  </employeeDB>
>
> *display.mxml*
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical"
> initialize="srv.send()" >
>     <mx:Script>
>         <![CDATA[
>             import mx.collections.ArrayCollection;
>             import mx.controls.Alert;
>             import mx.controls.Label;
>             import mx.rpc.events.ResultEvent;
>             import mx.rpc.events.FaultEvent;
>             var arremp:ArrayCollection=new ArrayCollection;
>             private function rsevent(e:ResultEvent)
>             {
>                 arremp=e.result.employeeDB.tblEmpDetails.empdetails;
>                 dg.dataProvider=arremp;
>                 dg.rowCount=arremp.length;
>             }
>              private function flevent(e:FaultEvent)
>             {
>                 Alert.show('fault '+e.fault.toString());
>             }
>             private function rep()
>             {
>                 lb.text=dg.selectedItem.empname;
>             }
>         ]]>
>     </mx:Script>
>     <mx:HTTPService id="srv" url="1.xml" result="rsevent(event)"
> fault="flevent(event)"/>
>     <mx:DataGrid id="dg"  x="239" y="29" change="rep()" />
>     <mx:Label id="lb" width="500"  x="258" y="377"/>
> </mx:Application>
>
> On Mon, Apr 27, 2009 at 1:11 PM, Sindhu <[email protected]> wrote:
>
> > Can someone tell me how to convert an xml file into an array
> > collection using actionscript.....?
>
> > Regards,
> > Sindhu.
>
> --
> Thanks & Regards,
>
> Jagan Mady's

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to