Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if an XMLList is empty in Flex

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?

like image 382
Raul Agrait Avatar asked Jan 23 '23 01:01

Raul Agrait


1 Answers

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.

like image 166
Cameron Avatar answered Jan 25 '23 23:01

Cameron