Reading xml string from remote server
Hi!
I'm trying a simple routine that pings a remote server and the remote server sends out an XML tagged response "<accepted>http:www.fdfd.com</accepted>", which is then used to get into the remote server. Here's what I've come-up so far:
<%
Response.Buffer = True
Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
Set xml = Server.CreateObject("Microsoft.XMLDOM")
url = "https://www.remoteServer.com/login/suplogin.cfx?id=STD&pass=STDP3SS"
xmlHttp.Open "GET", url, False
xmlHttp.Send
xmlDoc = xmlHttp.ResponseText
xml.async = False
xml.loadXML(xmlDoc)
urlPass = xml.documentElement.childNodes(0).nodeValue
Response.redirect urlPass
%>
If I assign a value (similar to tagged response value) to a local variant as under and use it with the above code it works fine, but as it is it would not work.
E.g. strURL="<accepted>http:www.fdfd.com</accepted>"
xml.loadXML(strURL)
Does anyone have a suggestion how can I make this work???
Appreciate any help!
Nirav
|