In jQuery 1.4.2, I was able to select the xml located on my html page by doing the following:
var xmlSettings = $("#xmlSettings")[0];
it is the same as:
document.getElementById("xmlSettings"); //this still works fine
In jquery 1.6.1 xmlSettings undefined. all i did was upgrade my jquery from 1.4.2 to 1.6.1 and now it doesn't work.
Is there any other choice I need to make, or do I need to add a plugin?
xml on the 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,
[SOLVED] Thanks Felix Kling
The problem seems to be one of the following:
1) IE9 does not correctly display IE8 standards mode. I recently upgraded to IE9, but my application still needs to run in IE8 standard mode, so I made it render in IE8 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 sure if in any case using normal document.getElementById("xmlSettings"); still working fine, so at the same time I will use this but very strange problem. I would not be surprised if this is an IE9 problem. Or maybe I'll stay on jquery 1.4.2.
source share