CRM 2011 JS: Reading XML file in CRM 2011

//Code Snippet

var nodePath = "//attributes/attribute";

var doc = new ActiveXObject("Microsoft.XMLDOM");

doc.preserveWhiteSpace = true;

doc.async = false;

doc.load(xmlPath);

params = new Array();

var nodelist;

nodelist = doc.selectNodes(nodePath);

for (var i = 0; i < nodelist.length; i++)

{

params[i] = nodelist(i).attributes[0].value;

}