Depending on the dot net webservice, you might only need to change 
your resultFormat="e4x".  Try that before you start doing this 
manually.

I am consuming dot net webservices this way.  The WS code 
response.writes a DataTable, and .net serializes it into XML 
automatically.  What you get in flex is a bit messy, with a lot of 
type info, but your data will be at <DocumentElement>

Tracy


--- In [email protected], "Nate Pearson" <[EMAIL PROTECTED]> 
wrote:
>
> I gotcha!  So what about adding children to that xml node?  Do you
> treat it just like a string or something?  so If I wanted to add a
> child to that node would it be something like this:
> 
> var newNode:XML = <myNode label={yourCollection[n]["label"]} id={
>  yourCollection[n]["id"]}>
> 
> newNode = newNode + <myNode label={yourCollection[n]["label"]} id={
>  yourCollection[n]["id"]}/>
> 
> I thought I saw some method called append in xml.  I was hoping I
> could create XMLNode(s) and do something like newNode.append
(myNewXMLNode)
> 
> thanks for responding so fast!
> 
> 
> --- In [email protected], "Jim Hayes" <jim@> wrote:
> >
> > You can write the values straight into the xml notation using 
curly
> > brackets : something like
> >  
> > var newNode:XML = <myNode label={yourCollection[n]["label"]} id={
> > yourCollection[n]["id"]}/>
> >  
> > not sure I have the arrayCollection syntax correct, but hopefully 
you
> > can see what I mean?
> >  
> > -----Original Message-----
> > From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> > Behalf Of Nate Pearson
> > Sent: 16 April 2008 16:59
> > To: [email protected]
> > Subject: [flexcoders] Building XML out of an Array Collection
> >  
> > I'm trying to change an array collection of typed objects from 
a .NET
> > webservice into XML.
> > 
> > My array collection is like this:
> > 
> > myNode{
> > label:String
> > id:int
> > children:ArrayCollection
> > }
> > 
> > The items in the children array collection are more of "myNode".
> > 
> > I want to put it into xml so it looks like this:
> > 
> > <myNodes>
> > <myNode label="test1" id="1"/>
> > <myNode label="test2" id="2">
> > <myNode label="test3" id="3"/>
> > <myNode label="test4" id="4"/>
> > <myNode label="test5" id="5"/>
> > </myNode>
> > <myNode label="test6" id="6"/>
> > </myNodes>
> > 
> > I always work with arraycollections and never with xml, but this
> > situation requires it. I just need to know how to start. I can 
loop
> > through my arraycollection tree if I just know how to do a node 
or two.
> > 
> > THANKS! :)
> > 
> > Nate
> >  
> > 
> > 
______________________________________________________________________
> > This communication is from Primal Pictures Ltd., a company
> registered in England and Wales with registration No. 02622298 and
> registered office: 4th Floor, Tennyson House, 159-165 Great Portland
> Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> > 
> > This e-mail is confidential and may be privileged. It may be read,
> copied and used only by the intended recipient. If you have received
> it in error, please contact the sender immediately by return e-mail 
or
> by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
> do not disclose its contents to any person.
> > This email has been scanned for Primal Pictures by the MessageLabs
> Email Security System.
> > 
______________________________________________________________________
> >
>


Reply via email to