I ran into a problem today trying to select elements in an XML tree. I
finally got it to work, but I had to make my XML handling different
from my HTML handling. Can someone help me to understand whether this
is a jquery bug or just a gap in my understanding?
To select my desired node in my HTML document, I used this syntax:
$('option[@value="27"]')
And it worked fine. Trying the same syntax on XML:
$('Effort[@weekNumber="5"], xml)
Causes the Javascript to fail entirely. But when I remove the @
symbol:
$('Effort[weekNumber="5"], xml)
It works fine. Why is the syntax different for XML?