topical media & game development

talk show tell print

professional-javascript-15-IEXmlDomExample.htm / htm

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <title>IE XML DOM Example</title>
  <script type="text/javascript">
  function createXMLDOM() {
      var arrSignatures = ["MSXML2.DOMDocument.5.0", "MSXML2.DOMDocument.4.0",
                           "MSXML2.DOMDocument.3.0", "MSXML2.DOMDocument",
      for (var i=0; i < arrSignatures.length; i++) {
          try {
              var oXmlDom = new ActiveXObject(arrSignatures[i]);
              return oXmlDom;
          } catch (oError) {
      throw new Error("MSXML not installed on your system.");           
  var oXmlDom = createXMLDOM();
       <p>This example simply tests to see if you have MSXML installed on your machine. If you don't, you'll see an error. If you do, you'll see nothing. </p>

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