xmlServerHttp

heyixiang 2004-12-30 05:18:00
function XmlServerHttpSend(url)
Dim xmlServerHttp
Set xmlServerHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
Dim lResolve, lConnect, lSend, lReceive
lResolve = 10 * 1000
lConnect = 10 * 1000
lSend = 30 * 1000
lReceive = 30 * 1000
xmlServerHttp.setTimeouts lResolve, lConnect, lSend, lReceive
xmlServerHttp.open "GET",url,False
xmlServerHttp.send
if xmlServerHttp.readyState=4 then
if xmlServerHTTP.status=200 then
XmlServerHttpSend=xmlServerHttp.responseText
else
XmlServerHttpSend="NO"
end if
else
XmlServerHttpSend="NO"
end if
end function


我得到的结果却是
<?xml version="1.0" encoding="UTF-8" ?>
- <password>
<Status>-10</Status>
<Description>Invalid Phone Number</Description>
</password>

如何得到Status的值?
...全文
74 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
davs 2004-12-30
  • 打赏
  • 举报
回复
Function GetStatus(Str)
Dim dom
set dom=Server.CreateObject("Microsoft.XMLDOM")
dom.async=false
dom.LoadXML(Str)
if dom.readyState=4 And Dom.parseError.errorCode=0 Then'装载成功
GetStatus=dom.documentElement.selectSingleNode("/password/Status").text
End If
End Function
heyixiang 2004-12-30
  • 打赏
  • 举报
回复
没人?
heyixiang 2004-12-30
  • 打赏
  • 举报
回复
寻求VBS下的帮助
heyixiang 2004-12-30
  • 打赏
  • 举报
回复
顶啊

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧