Forum Moderators: open
The problem I am having is i keep getting the error
################################################
Microsoft VBScript runtime error '800a01a8'
Object required: 'xmlDoc.selectSingleNode(...)'
/radio/req/req.asp, line 53
################################################
Any ideas where my XML code might be wrong? Am I not using the correct syntax for xml.responseText? What about xml.responseXML.XML? I dont know what would go here since i cant find a reference on all available selections.
The code I am using is roughly...
host = Request.ServerVariables("REMOTE_ADDR")
requests = "/req/?songID=" & songID & "&host=" & Server.URLEncode(host) & _
" HTTP\1.0" & VbCrlf & VbCrLf
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://" & samhost & ":" & samport & requests, False
xmldata = ""
If xml.readyState = 1 Then
xml.Send
xmldata = xml.responseText
Else
DoErr 803
End If
Set xml = Nothing
If xmldata = "" Then DoErr 804
'#################################
' Initialize data
'#################################
set xmlDoc = Server.createObject("Microsoft.XMLDOM")
xmlDoc.async = False
'xmlDoc.setProperty "ServerHTTPRequest", True
xmlDoc.load(xmldata)
response.write xmlDoc.selectSingleNode("REQUEST/status/code").Attributes.GetNamedItem("code").Text