Loadxml method in HTM and ASP

I had three different results:

1) http://SAG/load_xml.HTM?XMLforMe for









result: XMLforMe+true+XMLforMe

2) http://SAG/load_xml.ASP?XMLforMe for

<!- LANGUAGE = JScript ->
<%@ LANGUAGE = JScript %>







<%

Request_ServerVariables=Request.ServerVariables(“QUERY_STRING”)

function replace_X()
{
//alert(‘function replace_X()’)

while (temp.indexOf(out)>-1)
{
pos= temp.indexOf(out)
temp = “”
+(temp.substring(0, pos)
+add
+temp.substring((pos + out.length), temp.length))
}

}

out = “<” // replace this
add = “&lt” // with this
temp = “” + Request_ServerVariables // temporary holder
replace_X()

Request_ServerVariables = temp

out = “>” // replace this
add = “&gt” // with this
temp = “” + Request_ServerVariables // temporary holder
replace_X()

Request_ServerVariables = temp

out = “%20” // replace this
add = " " // with this
temp = “” + Request_ServerVariables // temporary holder
replace_X()

Request_ServerVariables = temp

xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”)
xmlDoc.async = false;
boolValue=xmlDoc.loadXML(‘XMLforMe’)
//boolValue=xmlDoc.loadXML(Request_ServerVariables)
xmlDoc_xml = xmlDoc.xml

%>

<%= Request_ServerVariables+’+’+boolValue+’+’+xmlDoc_xml %>




result: XMLforMe+true+XMLforMe

3) http://SAG/load_xml.ASP?XMLforMe for

<!- LANGUAGE = JScript ->
<%@ LANGUAGE = JScript %>







<%

Request_ServerVariables=Request.ServerVariables(“QUERY_STRING”)

function replace_X()
{
//alert(‘function replace_X()’)

while (temp.indexOf(out)>-1)
{
pos= temp.indexOf(out)
temp = “”
+(temp.substring(0, pos)
+add
+temp.substring((pos + out.length), temp.length))
}

}

out = “<” // replace this
add = “&lt” // with this
temp = “” + Request_ServerVariables // temporary holder
replace_X()

Request_ServerVariables = temp

out = “>” // replace this
add = “&gt” // with this
temp = “” + Request_ServerVariables // temporary holder
replace_X()

Request_ServerVariables = temp

out = “%20” // replace this
add = " " // with this
temp = “” + Request_ServerVariables // temporary holder
replace_X()

Request_ServerVariables = temp

xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”)
xmlDoc.async = false;
//boolValue=xmlDoc.loadXML(‘XMLforMe’)
boolValue=xmlDoc.loadXML(Request_ServerVariables)
xmlDoc_xml = xmlDoc.xml

%>

<%= Request_ServerVariables+’+’+boolValue+’+’+xmlDoc_xml %>



result: XMLforMe+false+

Why?

Thank for attension.
:eek:

Question removed by author.
CBH.
:wink: