title: Browser-independent way of using DOMDocument in Jscript
body: <p>What is the best way to create browser-independent Jscript code in which a DOMDocument has to be created?<br>
  I have this code (extracted from @MartinHonnen 's answer to my question <a href="https://stackoverflow.com/questions/10222750/how-have-an-xslt-javascript-extension-function-return-a-node-set">How can make an XSLT Javascript extension function return a node-set?</a>): </p>
  
  <pre><code>function tokenize (input) {
      var doc = new ActiveXObject('Msxml2.DOMDocument.6.0');
      ...
      }
  </code></pre>
  
  <p>which worked fine in an MSXML 6.0 XSLT processor (note that the Jscript is embedded in an xslt sheet) and in IE9 (although strangely enough not every time - stepping into debug mode seems to help a bit here), but didn't do so good in IE8, where the class had to be changed to <code>Msxml2.DOMDocument.3.0</code> to get it working properly. Apparently IE8 Jscript supports MSXML 3.0 but not higher versions.  </p>
  
  <p>So now I am looking for browser-type and browser-version independent code making use of DOMDocument.<br>
  Who can provide me with this?<br>
  I added <code>Jquery</code> as a tag because the best solution may be found there.<br>
  Side-question: where can I find an overview of which DOM class is supported by which browser type+version?</p>