title: javascript XSL in google chrome
body: <p>I'm using the following javascript code to display xml/xsl:</p>
  
  <pre><code>function loadXMLDoc(fname)
  {
    var xmlDoc;
    // code for IE
    if (window.ActiveXObject)
    {
      xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
    }
    // code for Mozilla, Firefox, Opera, etc.
    else if (document.implementation
    &amp;&amp; document.implementation.createDocument)
    {
      xmlDoc=document.implementation.createDocument("","",null);
     }
    else
    {
      alert('Your browser cannot handle this script');
    }
    try {
      xmlDoc.async=false;
      xmlDoc.load(fname);
      return(xmlDoc);
      }
   catch(e)
   {
    try //Google Chrome
    {
     var xmlhttp = new window.XMLHttpRequest();
     xmlhttp.open("GET",file,false);
     xmlhttp.send(null);
     xmlDoc = xmlhttp.responseXML.documentElement;
     return(xmlDoc);
    }
    catch(e)
    {
     error=e.message;
    }
   }
  }
  
  function displayResult()
  {
  xml=loadXMLDoc("report.xml");
  xsl=loadXMLDoc("report.xsl");
  // code for IE
  if (window.ActiveXObject)
    {
      ex=xml.transformNode(xsl);
      document.getElementById("example").innerHTML=ex;
    }
    // code for Mozilla, Firefox, Opera, etc.
    else if (document.implementation
    &amp;&amp; document.implementation.createDocument)
    {
      xsltProcessor=new XSLTProcessor();
      xsltProcessor.importStylesheet(xsl);
      resultDocument = xsltProcessor.transformToFragment(xml,document);
      document.getElementById("example").appendChild(resultDocument);
    }
  }
  </code></pre>
  
  <p>It works find for IE and Firefox but chrome is fail in the line:</p>
  
  <pre><code>document.getElementById("example").appendChild(resultDocument);
  </code></pre>
  
  <p>Thank you for you help</p>