In jquery 1.4.2 i was able to select xml residing in my html page by doing the following:
var xmlSettings = $("#xmlSettings")[0];
this is the same as:
document.getElementById("xmlSettings"); //this still works fine
In jquery 1.6.1 xmlSettings is undefined. all i did was upgrade my jquery from 1.4.2 to 1.6.1 and now this is not working.
is there a different selection that i need to do, or do i need to add a plugin?
xml in Html page:
<xml id="xmlSettings">
<items>
<item name="Test1">Test data 1</item>
<item name="Test2">Test data 2</item>
<item name="Test3">Test data 3</item>
</items>
</xml>
thanks in advance,
[Resolved] Thanks to Felix Kling
the problem seems to be one of the following:
1) IE9 is not rendering IE8 Standards mode properly.
I just recently upgraded to IE9 but my app still needs to run in IE8 Standard Mode therefore I’ve forced it in IIS to render in IE8 using X-UA-Compatible IE=8
2) i also updated my jquery file from 1.4.2 to 1.6.1
but it could be a combination of these things i’m not really sure anyway using normal document.getElementById("xmlSettings"); still works fine so in the mean time i’ll use that but very bizarre issue. i wouldn’t be surprised if it’s an IE9 issue. Or maybe i’ll remain on jquery 1.4.2 for now.
This is the real reason it’s not working: a regression in jQuery 1.4.2.