Try this:
var myName:String = node.attribute("Name");
Or make sure *every* node has the Name attribute, including the root
node. The loop works because it skips the root. I just always use
attribute() if I am reading, and @ only if I am setting.
Tracy
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of fishburn_david
Sent: Monday, November 24, 2008 4:20 PM
To: [email protected]
Subject: [flexcoders] Re: XML attributes
I was finally able to do this with the following code I hope it helps
someone else later):
for each (var channel:XML in items)
{
var myString:String = [EMAIL PROTECTED];
}
Not sure why I had to use a for each loop to do this.
Semantically I thought this would have been equivalent:
var myString:String = [EMAIL PROTECTED];
Dave