I'm working with an xml node of the following structure:
<CF>
<T>
<TX>title</TX>
<em>15:2:</em>
</T>
<KW>
<TX>SOMETHING ELSE</TX>
</KW>
<!-- OTHER TAGS, SOME OF WHICH HAVE A <TX> CHILD -->
</CF>
Things work more or less as I expect in firefox, but I'm getting weird behavior in IE8. For example, the following gives me a jquery object of length 14:
jQuery("T TX", xmlDoc).length
where it should be only one (the "CF" tag contains only one "T" tag, which in turn contains only one "TX" tag).
Adding to the strangeness, if I remove the "T" from the selector, as in the following:
jQuery("TX", xmlDoc).length
I get FEWER, rather than an equal or greater number of results (the jquery object's length is 12).
So, the first question is: if there's only one TX tag, and it has only one "T" tag, why does jquery find 14 "TX" tags which are descendants of a "T"?
The second question is: if I simplify the selector, removing the "T", why do I get fewer, rather than more results?
Am I doing something wrong, or have I stumbled upon a bug?