I'm parsing some xml, and given a particular node, I'm trying to figure out which one of these it is:
An element with nested elements
<theElement><nestedElement>foobar</nestedElement></theElement>
An element with text/data in it
<theElement>foobar</theElement>
I've tried checking the length of Node.text, but Node.text returns "foobar" for theElement in both of the above examples.
My code is recursing down through an XML structure, and at each point needs to know if its reached some text/data, or if there are more elements below.