Many of you might have known this, but if you were me, there would be times when you actually forget how to do this properly (or I’m getting senile lol). Anyway, that’s why I decided to make a post about this so I myself can refer to it in times of need.
Consider you have an AS3 XML object like this: <root><Element1></Element1></root>
For some reason, you don’t know if <Element1> has any child element, or even text content, or not. And here’s how you’re gonna find it out:
If it outputs “0”, you’re 100% certain this is a completely empty XML element!
And that’s it! Hope this helps 🙂