4

If I have an XMLList object in Flex, what is the proper way to check to see if the list is empty? Should I just compare the result of myList.length() > 0, myList.toString() != "" or try another method altogether?

Raul Agrait
  • 5,938
  • 6
  • 49
  • 72

1 Answers1

9

I would go with the simple myList.length() > 0 method.

You can see an example of the length() function in the ECMAScript for XML (E4X) specification (page 104), which Actionscript implements.

Cameron
  • 96,106
  • 25
  • 196
  • 225