http://blog.csdn.net/online/archive/2004/07/07/35994.aspx '以下是判断数据是否正确提交 Dim strretval As String Dim ResponseXml As DOMDocument Set ResponseXml = New DOMDocument Set ResponseXml = httpRequest.ResponseXml strretval = ResponseXml.selectSingleNode("//retval").Text MsgBox strretval
Dim XMLHTTP As New XMLHTTPRequest
Dim sRequest As String '请求的URL
Dim objXmlDoc As New DOMDocument
sRequest = Trim(Text1.Text)
XMLHTTP.open "get", sRequest, False Set objXmlDoc = XMLHTTP.responseXML现在的问题是怎么读取对象objXmlDoc 中的内容啊
Dim objResult As DOMDocument30
Set xmlHttp = New XMLHTTP30
xmlHttp.open "Get", URL, False
xmlHttp.send '记得加上这句 Set objResult = New DOMDocument30
objResult.async = False
if objResult.loadXML( xmlHttp.responseText) then
'加载成功
end if
这个问题下午我也是这样解决的了。但是为什么用XMLHTTP对象的responsXML方法取不到值呢
'以下是判断数据是否正确提交 Dim strretval As String Dim ResponseXml As DOMDocument Set ResponseXml = New DOMDocument Set ResponseXml = httpRequest.ResponseXml strretval = ResponseXml.selectSingleNode("//retval").Text MsgBox strretval