读书人

请给看看下面有异常吗

发布时间: 2012-04-07 17:31:50 作者: rapoo

请给看看,下面有错误吗?
dim doc,nd,ndfd
set doc=CreateObject("Microsoft.XMLDOM")
doc.load("vb.xml")
set nd=doc.documentElement
set ndfd=nd.selectNodes("field")

最后一句提示有错,请给指点下。再有我的服务器是windows 2003,同时开启了asp和asp.net,是不是有影响?

[解决办法]

VBScript code
<%Set oDoc = CreateObject("Msxml2.DOMDocument")With oDoc    .async              = False    .validateOnParse    = False    .preserveWhiteSpace = False    .resolveExternals   = False    .load Server.MapPath("vb.xml")    If .parseError.errorCode <> 0 Then        sErrMsg     = .parseError.errorCode & "|" &_                      .parseError.srcText & "|" & .parseError.reason        Response.Write sErrMsg        Response.End    End IfEnd WithSet ndfd = oDoc.selectNodes("//field")Response.Write ndfd.lengthSet oDoc = Nothing%> 

读书人网 >ASP

热点推荐