Jitendra Patel

Jitendra Patel

  • NA
  • 149
  • 0

How to load XML file using in Javascript?

Mar 29 2010 1:59 AM
Hi,

how to load and read xml files using in javascript?
please my javascript function and replay me.

Below my code:-
function loadxml()
{
 var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async = "false";
                    xmlDoc.load("Validation.xml");
                    var Validation = xmlDoc.documentElement;
                    alert(Validation);
                    var Validationtype = Validation.childNodes(0);
                    alert(Validationtype);
                    document.getElementById('Textbox1').innerHTML = Validation.getElementsByTagName("Name")[0].text;
}

Thanks,
Jitendra Patel

Answers (9)