why do we need 2 backslashes when loading a document.
<html>
<head>
<title>MSXML load example</title>
<script>
function showXML() {
alert("The document element of the document is named : \n" +
objXMLDOM.documentElement.nodeName);
}
</script>
<head>
<body>
<p>This example tests the <b>load( )</b> method.</p>
<script language="JScript" type="text/javascript">
try {
var objXMLDOM = new ActiveXObject ( "Msxml2.DOMDocument.3.0" ) ;
objXMLDOM.load("C:\\saxon\\School\\xml\\beg\\ch11\\SimpleDoc.xml") ;
//If no exception is raised MSXML 3 is 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>
<html>
<head>
<title>MSXML load example</title>
<script>
function showXML() {
alert("The document element of the document is named : \n" +
objXMLDOM.documentElement.nodeName);
}
</script>
<head>
<body>
<p>This example tests the <b>load( )</b> method.</p>
<script language="JScript" type="text/javascript">
try {
var objXMLDOM = new ActiveXObject ( "Msxml2.DOMDocument.3.0" ) ;
objXMLDOM.load("C:\\saxon\\School\\xml\\beg\\ch11\\SimpleDoc.xml") ;
//If no exception is raised MSXML 3 is 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>