在XML中删除数据的时候出错"缺少对象: 'root.childNodes.item(...)' ",请大侠帮帮忙,在线等!!!

shenqy 2007-01-15 10:32:44
源代码:
<%
Set rootXML = server.CreateObject("MSXML.DOMDocument")
rootXML.async = false
rootXML.load server.MapPath("/Config\SendMailLog.config")
Set root = rootXML.documentelement



ss =request.Form("pcl")
if ss= "" then
response.Write("请选择要删除的记录 [ <a href=# onclick=history.go(-1)>返回</a> ]")
response.End()
end if

for each xm in request.Form("pcl")
set cNode = rootXML.documentElement.selectSingleNode("/EmailLog")
Maxlbid = root.childNodes.length - 1
for i=0 to Maxlbid
score = getAttValue(i,3)
if score= xm then
cNode.RemoveChild(cNode.childNodes(i))
rootXML.save server.MapPath("/Config\SendMailLog.config")
end if
next
next


Function getAttValue(ByVal nNode, ByVal nAtt)
getAttValue=root.childNodes.item(nNode).attributes.item(nAtt).value
End Function
%>
<table><tr>
<td>
<a href="<%=request.ServerVariables("HTTP_REFERER")%>">返回</a>
</td>
</tr></table>
在删除时候,报错:Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: 'root.childNodes.item(...)'
是什么原因??
在线等,急啊!!
...全文
205 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,391

社区成员

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

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