topical media & game development

talk show tell print

professional-javascript-15-CrossBrowserXmlDomExample.htm / htm



  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  
  <html>
      <head>
          <title>Cross-Browser XML DOM Example</title>
          <script type="text/javascript" src="detect.js"></script>
          <script type="text/javascript" src="xmldom.js"></script>
      </head>
      <body>
          <p>This example loads an XML file and displays the contents in an alert.</p>
          <script type="text/javascript">
          var oXmlDom = new XmlDom();
          oXmlDom.onreadystatechange = function () {
              if (oXmlDom.readyState == 4) {
                  alert(oXmlDom.xml);
              }
          };
          
          oXmlDom.load("test.xml");
  
          </script>
   
   
      </body>
  </html>
  


(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.