topical media & game development

talk show tell print

professional-javascript-15-MozillaXsltExample.htm / htm

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <title>Mozilla XSLT Example</title>   
          <script type="text/javascript" src="detect.js"></script>
          <script type="text/javascript" src="xmldom.js"></script>
          <script type="text/javascript">
              window.onload = function () {
                  var oXmlDom = new XmlDom();
                  var oXslDom = new XmlDom();
                  oXmlDom.async = false;
                  oXslDom.async = false;
                  var oProcessor = new XSLTProcessor();
                  var oResultDom = oProcessor.transformToDocument(oXmlDom);
                  var oDiv = document.getElementById("divResult");
                  oDiv.innerHTML = oResultDom.xml;
          <p>This example loads employees.xml and transforms it using employees.xslt. 
          The resulting code is then displayed.</p>
          <div id="divResult"></div>

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.