title: Load xml data into HTML
body: <p>I am trying to access data from a xml file into an html file, my JavaScript code is:</p>
  
  <pre><code>var xmlDoc;
  var abc = new Array();
  
  if (window.XMLHttpRequest){
      xmlDoc = new window.XMLHttpRequest();
      xmlDoc.open("GET","wwww/../student.xml",false);
      xmlDoc.send("");
      xmlDoc = xmlDoc.responseXML;
  }
  
  var x = xmlDoc.getElementsByTagName("CD");
  
  for (i = 0; i &lt; x.length; i++){
      abc[i] = x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue;
      document.write("value of abc["+i+"] is "+abc[i]);
  }
  </code></pre>
  
  <p>But it's not working in IE. It displays an error i.e. "access is denied".</p>
  
  <p>Can someone please tell me why is it not working in IE?</p>
  
  <p>edited</p>
  
  <p>the whole code is  </p>
  
  <pre><code> var xmlDoc;
  
   try
  {
  
   if (window.XMLHttpRequest)
  
   {
  
    xmlDoc=new window.XMLHttpRequest();
  
   xmlDoc.open("GET","cd_catalog.xml",false);
  
   xmlDoc.send("");xmlDoc=xmlDoc.responseXML;
  
  } 
  
  else if (ActiveXObject("Microsoft.XMLDOM"))
  
  {
  
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  
  xmlDoc.async=false;
  
  xmlDoc.load("cd_catalog.xml");
  
  }
  
  }catch(e)
  
  {
  
  document.write("error");
  
  }
  
  document.write("&lt;table border='1'&gt;");
  
  var x=xmlDoc.getElementsByTagName("CD");
  
  for (i=0;i&lt;x.length;i++){
  
  document.write("&lt;tr&gt;&lt;td&gt;");
  
  document.write(x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue);
  
  document.write("&lt;/td&gt;&lt;td&gt;");document.write(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue);
  
  document.write("&lt;/td&gt;&lt;/tr&gt;");
  
  }
  
  document.write("&lt;/table&gt;");
  </code></pre>
  
  <p>i got this code from here <a href="http://www.scribd.com/doc/19290029/XML-Javascript-Tutorial" rel="nofollow">http://www.scribd.com/doc/19290029/XML-Javascript-Tutorial</a></p>
  
  <p>it is there by the name<b> Load an XML String - A Cross browser Example</b></p>
  
  <p>i am not able to run it in IE7.. can someone hrlp</p>