what is the best way to change(without jquery) these html/javascript to work with ie9,
<html>
<body>
<div id="xmls">
<xml id="myXml">
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
</bookstore>
</xml>
</div>
<!-- ...more html -->
</body>
</html>
And read this html section with script
function readBooks() {
var doc = null;
try {
doc = document.getElementById("myXml").XMLDocument.documentElement.childNodes.length;
alert('msg =' + doc);
//i need child nodes to iterate and show values,
} catch (ex) {
alert("problems to load xml" + doc);
throw ex;
}
}
these works fine with ie6,7,8.
but with with ie9 not.
the XMLDocument property is undefined,
thanks,