In E4X, I know how to test if an element has a particular attribute, but how do I test if an element has text nodes?
js>x = <foo><bar /><baz attr1="123" /><quux>some random text</quux></foo>
<foo>
<bar/>
<baz attr1="123"/>
<quux>some random text</quux>
</foo>
js>'@attr1' in x.baz
true
js>'@attr1' in x.quux
false