extract data from xmllist using e4x Flex 4

1.1k views Asked by At

here is a simplification of my problem. I'm trying to extract the number '11' below, but none of my trace statements print anything but empty strings. When I examine the list variable in the debugger, it is not null. Thanks!

var list:XMLListCollection = new XMLListCollection();
var x:XML = <property name="id" value="11" />
list.addItem(x);
trace ("list " + list);
trace ("list 0   " + list[0]);
trace ("value  " + list[0].(@value));
trace ("value  " + list[0].(@value).toString());
trace ("value  " + list[0].(@value).value);
trace ("value  " + list[0].(@value).toString());
1

There are 1 answers

0
dt1000 On BEST ANSWER

This works:

list[0].(trace(@value));

and this works:

list[0].(myCaptureValueFunction(@value));