一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp解析xml 文件

时间:2022-06-30 09:24:20 编辑:袖梨 来源:一聚教程网

asp解析xml 文件

Sub GetUserinfo()
 Dim Rs,Sql
 XmlDoc.loadxml "dvbbs0

"
 
 Sql = "SELECT TOP 1 * FROM NC_User WHERE UserName='" & Newasp.CheckBadstr(UserName) & "'"
 Set Rs = Newasp.Execute(Sql)
 If Not Rs.Eof And Not Rs.Bof Then
  XmlDoc.documentElement.selectSingleNode("body/email").text = Rs("usermail") & ""
  XmlDoc.documentElement.selectSingleNode("body/question").text = Rs("question") & ""
  XmlDoc.documentElement.selectSingleNode("body/answer").text = Rs("answer") & ""
  XmlDoc.documentElement.selectSingleNode("body/gender").text = Rs("Usersex") & ""
  XmlDoc.documentElement.selectSingleNode("body/birthday").text = ""
  XmlDoc.documentElement.selectSingleNode("body/mobile").text = ""
  XmlDoc.documentElement.selectSingleNode("body/userip").text = Rs("userlastip") & ""
  XmlDoc.documentElement.selectSingleNode("body/jointime").text = Rs("JoinTime") & ""
  XmlDoc.documentElement.selectSingleNode("body/experience").text = Rs("experience") & ""
  XmlDoc.documentElement.selectSingleNode("body/ticket").text = ""
  XmlDoc.documentElement.selectSingleNode("body/valuation").text = Rs("userpoint") & ""
  XmlDoc.documentElement.selectSingleNode("body/balance").text = Rs("usermoney") & ""
  XmlDoc.documentElement.selectSingleNode("body/posts").text = Rs("postcode") & ""
  XmlDoc.documentElement.selectSingleNode("body/userstatus").text = Rs("UserLock")
  XmlDoc.documentElement.selectSingleNode("body/homepage").text = Rs("HomePage") & ""
  XmlDoc.documentElement.selectSingleNode("body/qq").text = Rs("oicq")
  XmlDoc.documentElement.selectSingleNode("body/msn").text = ""
  XmlDoc.documentElement.selectSingleNode("body/truename").text = Rs("TrueName") & ""
  XmlDoc.documentElement.selectSingleNode("body/telephone").text = Rs("phone") & ""
  XmlDoc.documentElement.selectSingleNode("body/address").text = Rs("address") & ""
  Status = 0
  Messenge = Messenge & "
  • 读取用户资料成功。
  • "
     Else
      Status = 1
      Messenge = Messenge & "
  • 该用户不存在。
  • "
     End If
     Rs.Close
     Set Rs = Nothing
    End Sub

    热门栏目