Thanks, thats exactly what I needed to know. :)

JesterXL <[EMAIL PROTECTED]> wrote:
Simple example of XML in Flex 1.5:

var yourXML:XML = XML(srv.result);
var topNodes_array:Array = yourXML.childNodes;
var topNodesLen:Number = topNodes_array.length;
while(topNodesLen--)
{
    var subNode:XMLNode = topNodes_array[topNodesLen];
    var subNodeAttribute:String = subNode.attributes.someval;
    trace("someval: " + subNodeAttribute);
}


----- Original Message -----
From: "papuss65" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, November 24, 2005 10:48 PM
Subject: [flexcoders] Looping through XML to get attributes values


Hi, am new to Flex and Actionscript and I am trying to get my head
around looping through XML attributes. Actionscript seems quite
complex when dealing with XML so I was hoping someone here could give
me a hand.

To begin with I would like to put the information in a Tree or DataGrid.

So far, I get my XML:

<mx:HTTPService id="srv" url=""
        resultFormat="xml"/>

then I can read/display

srv.result.childNodes[a].childNodes[b].attributes.Type

I want to be able to loop through [a] and [b] and get all the
attributes.ID as my column or tree nodes. I guess.. where to start..
is my problem. Thanks








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







Do you Yahoo!?
Never miss an Instant Message - Yahoo! Messenger for SMS

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to