Js defines an xml object, vardata & quot; JQUERY can convert a string into an XML object, and then use find () method to perform node operations on the XML converted from this string. However, jQuery cannot parse XML in IE, and the text object is parsed in IE. Solution: Judge... js to define an xml object, var data = "";
JQUERY can convert a string into an XML object, and then use the find () method to perform node operations on the XML converted into this string.
However, jQuery cannot parse XML in IE, and the text object is parsed in IE.
Solution: Determine whether the web browser is an Internet Explorer. If yes, recreate and load the xml object.
Var xml; if ($. browser. msie) {// & parseInt ($. browser. version) <9 alert ("This is the IE version"); xml = new ActiveXObject ("Microsoft. XMLDOM "); xml. async = false; xml. loadXML (data); // xml = $ (xml ). children ('nodes '); // The nodes here is the top node} else {xml = data;} alert ($ (xml ). find ("DataRow "). attr ("Id "));
Js defines an xml object, var data = "";
JQUERY can convert a string into an XML object, and then use the find () method to perform node operations on the XML converted into this string.
However, jQuery cannot parse XML in IE, and the text object is parsed in IE.
Solution: Determine whether the web browser is an Internet Explorer. If yes, recreate and load the xml object.
Var xml; if ($. browser. msie) {// & parseInt ($. browser. version) <9 alert ("This is the IE version"); xml = new ActiveXObject ("Microsoft. XMLDOM "); xml. async = false; xml. loadXML (data); // xml = $ (xml ). children ('nodes '); // The nodes here is the top node} else {xml = data;} alert ($ (xml ). find ("DataRow "). attr ("Id "));