How to check if XMLLIST is empty in Flex

If I have an XMLList object in Flex, what is the correct way to check if the list is empty? Should I just compare the results of myList.length()>? 0, myList.toString()! = “” Or try another method?
I will choose the simple myList.length()> 0 method.

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

If I am in Flex There is an XMLList object, what is the correct way to check if the list is empty? Should I just compare the results of myList.length()>? 0, myList.toString()! = “” Or try another method?

I will choose the simple myList.length()> 0 method.

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

Leave a Comment

Your email address will not be published.