Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

line break in string cause probs

Status
Not open for further replies.

lalzad

IS-IT--Management
Nov 29, 2006
15
CA
this works fine
<html>
<head>
<title>Test MSXML Install</title>
<head>
<body>
<script language="JScript" type="text/javascript">
try {
var strXML = "<?xml version='1.0' ?><AnyElement>Sometext</AnyElement>"
var objXMLDOM = new ActiveXObject ( "Msxml2.DOMDocument.3.0" ) ;
objXMLDOM.loadXML(strXML) ;

//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>
</body>
</html>
..................................................
this gives me a blank page
<html>
<head>
<title>Test MSXML Install</title>
<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 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>
</body>
</html>
 
> var strXML = "<?xml version='1.0' ?><AnyElement>Some
text</AnyElement>"

I wonder what can one expect if one does not even follow the syntax of the language one uses? Can we leave the matter of syntax to imagination? Besides, there are language forum where syntax question should be posted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top