load url problem

Hi
I have load url problem
Im using VBScript or JavaScript in ASP Pages
this code is work
---------------------------------------------
<%
Set xmlDoc = CreateObject(“Microsoft.XMLDOM”)
xmlDoc.async = “false”
xmlDoc.Load(Server.Mappath(“tester.xml”))
%>
but this code not work
----------------------------------------------
<%
Set xmlDoc = CreateObject(“Microsoft.XMLDOM”)
xmlDoc.async = “false”
xmlDoc.Load (“http://localhost/tamino/xpack/anketlist?_xql=anket[id=‘1’]”))
%>
-----------------------------------------------
why ?

Please Hlp…

Best Regards

Hi
I have load url problem
Im using VBScript or JavaScript in ASP Pages
this code is work
---------------------------------------------
<%
Set xmlDoc = CreateObject(“Microsoft.XMLDOM”)
xmlDoc.async = false
xmlDoc.Load(Server.Mappath(“tester.xml”))
%>
but this code not work
----------------------------------------------
<%
Set xmlDoc = CreateObject(“Microsoft.XMLDOM”)
xmlDoc.async = false
xmlDoc.Load (“http://localhost/tamino/xpack/anketlist?_xql=anket[id=‘1’]”))
%>
-----------------------------------------------
why ?
Please Hlp…

Best Regards

What happens if you open a browser (IE5 say), and issue the URL:

http://localhost/tamino/xpack/anketlist?_xql=anket[id=‘1’]

Does this work? or is the URL in error? If the URL is in error at least you will be able to tell what the problem is.

If this URL is correct, then I do not know whats wrong. The MS DOM has a parseError object which you can use to determine the problem. Maybe it is a problem of encoding for example.

code:
xmlDoc.Load (“http://localhost/tamino/xpack/anketlist?xql=anket[id=‘1’]”))
err = xmlDoc.parseError.errorCode

Hi,
If i’m not mistaken, i think the query should be loaded in this manner instead:

Dim xmlhttp
Set xmlhttp = server.CreateObject(“Microsoft.XMLHTTP”)
method = “GET”
url = http://localhost/tamino/xpack/anketlist?_xql=anket[id=‘1’]

xmlhttp.open method,url,false
xmlhttp.setRequestHeader “Content-Type”,“application/x-www-form-urlencoded; charset=UTF-8”
xmlhttp.send(data)
.
.
.
xmlDoc.load(xmlhttp.responseXML)

This should work.

rgds,
Ian

Are you sure that the id is not an attribute? I.e. “@id”?