loadxmldoc.js

  1. function loadXMLDoc(dname)
  2. {
  3. var xmlDoc;
  4. // code for IE
  5. if (window.ActiveXObject)
  6. {
  7. xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  8. }
  9. // code for Mozilla, Firefox, Opera, etc.
  10. else if (document.implementation && document.implementation.createDocument)
  11. {
  12. xmlDoc=document.implementation.createDocument("","",null);
  13. }
  14. else
  15. {
  16. alert('Your browser cannot handle this script');
  17. }
  18. xmlDoc.async=false;
  19. xmlDoc.load(dname);
  20. return(xmlDoc);
  21. }