Monday, May 17, 2010

Parse XML file in Javascript

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
function verify() {
if (xmlDoc.readyState != 4) {
return false;
}
}
function ParseSliderXML(path) {
xmlDoc.async = "false";
xmlDoc.onreadystatechange = verify;
xmlDoc.load(path);
var ticker = xmlDoc.documentElement;
//alert(ticker);
return ticker.xml;
}

No comments: