Why does this work in Firefox but not IE?

Why does this work in Firefox but not IE?

Hi All,

Consider the following snippet:

$("<StudentEnrollment><Students><Student>John Doe</Student></Students></StudentEnrollment>").find("Student").length

In IE8, that will return 0 (because it found no nodes).  In Firefox, that snippet will return 1 (because it found one node that matched the selector "Student").

Why the difference?  And how do I get this code working across browsers?  Essentially, I've got some XML, and I want to search it for all nodes that match the selectory "Student" (i.e., that have the tag name "Student").

I'm using jQuery 1.4.2.

Thanks for any suggestions!

  -Josh