以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  [求助]asp读取xm的数字是字符型还是整型l  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=46080)


--  作者:kpsheep12
--  发布时间:4/26/2007 8:38:00 PM

--  [求助]asp读取xm的数字是字符型还是整型l
请各位大虾帮忙看看:
<% dim numvalue
   nodenum=Request("nodenum")
   voltage=Request("voltage")
   current=Request("current")
   volmax=Request("volmax")
   curmax=Request("curmax")
   xmlhd = Server.mappath("xml1.inc")
  set objDom = Server.CreateObject("MicroSoft.XMLDOM")
  objDom.async = false
  objDom.load (Server.MapPath("readdata.xml"))
  set numNode = objDom.getElementsByTagName("node")
  for i=0 to  numNode.length-1 step 1
       set num = numNode.item(i).firstChild
       set numvalue = cint(num.firstChild.nodeValue)------------------------------错误
      
     if cint(numvalue) = cint(nodenum)  then
     response.write("error")
     response.redirect ("addlist.html")
     Response.End
     end if
  nex
错误行的提示是Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: '[number: 1]'
我xml文档里放的都是数字,还有cint是这样用吗?
--  作者:Qr
--  发布时间:4/27/2007 1:01:00 PM

--  
文本字符。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms