topical media & game development
basic-xml-11-MSXMLTest2.htm / htm
<html>
<head>
<title>Test MSXML Install</title>
<script>
function showXML(){
alert(objXMLDOM.documentElement.nodeName);
}
</script>
</head>
<body>
<script language="JScript" type="text/javascript">
try {
var strXML = "<?xml version='1.0' ?><AnyElement>Some text</AnyElement>"
var objXMLDOM = new ActiveXObject("Msxml2.DOMDocument.3.0");
objXMLDOM.loadXML(strXML);
// If no exception is raised MSXML 3 must be installed.
document.write("MSXML 3 is installed on your machine.");
}
// If there is an exception it could be a coding error but
// it is likely that MSXML 3 is not installed.
catch (e)
{
document.write("MSXML 3 is NOT installed on your machine.");
}
</script>
<br /><br />
<input type="button" value="Click here to show XML" onclick="showXML()" />
</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.