extract data from xmllist using e4x Flex 4
문제
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());
해결책
This works:
list[0].(trace(@value));
and this works:
list[0].(myCaptureValueFunction(@value));
제휴하지 않습니다 StackOverflow