关于asp读取xml文件的问题
我有个asp页面,需要读取xml文件
<html>
<title>read xml</title>
<body>
<%
dim node,i,nodecount
set Doc = CreateObject("Microsoft.XMLDOM")
Doc.async = false
Doc.load(Server.MapPath("data.xml"))
set root = Doc.documentElement
set nodeLis = root.ChildNodes ‘出现问题的地方
nodeCount = nodeLis.length
For i=1 to nodeCount
set node = nodeLis.nextNode()
set cost = node.attributes.getNamedItem("cost")
%>
第 <%=i%> 条记录:
<table border="1">
<tr>
<td width="16" rowspan="2"><img src="<%=node.selectSingleNode("img").text%>"/></td>
<td width="17">书名</td>
<td width="48">出版社</td>
<td width="32">价格</td>
</tr>
<tr>
<td>
<%=node.selectSingleNode("name").text%>
</td>
<td>
<%=node.selectSingleNode("publisher").text%>
</td>
<td>
<%= cost.text%>
</td>
</tr>
</table>
<%
Next
set root=nothing
set doc=nothing
%>
</body>
</html>
老是提示:
set nodeLis = root.ChildNodes
这一行“缺少对象”,不知道是怎么回事,请帮忙