Hello ,
I am very new to XML and javascript . I want to display data from a XML file using javascript . My XML file is named as first.xml . My html file is as below :
<html>
<body>
<script langauge = "text/javascript">
var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
xmlDoc.load('fi rst.xml');
xmlObj=xmlDoc.d ocumentElement;
alert(xmlObj.xm l);
</script>
</body>
</html>
But this does not work ? Can anyone help me ?
I am very new to XML and javascript . I want to display data from a XML file using javascript . My XML file is named as first.xml . My html file is as below :
<html>
<body>
<script langauge = "text/javascript">
var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
xmlDoc.load('fi rst.xml');
xmlObj=xmlDoc.d ocumentElement;
alert(xmlObj.xm l);
</script>
</body>
</html>
But this does not work ? Can anyone help me ?
Comment