johnb.
10-26-2004, 09:15 PM
hey guys-
i'm gettin some errors with the following script and i can't figure out why. it makes it seem like there's a problem with my server, but if i put the same basic code in the middle of the page instead of calling a function, or if i have it use a text file as opposed to xml, there are no errors returned. thanks for any help. lemme know if i should explain it more in detail. thanks again-
<body>
<%
Dim xmlDoc
xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async = false
xmlDoc.load("fountains.xml")
Set nodes = xmlDoc.documentElement.selectNodes("product")
Dim iNode
%>
<table>
<tr>
<%
For each iNode in nodes
Dim myName, myPrice, myDesc
myName = iNode.selectSingleNode("name").text
myPrice = iNode.selectSingleNode("price").text
myDesc = iNode.selectSingleNode("desc").text
%>
<td><%= myName %></td>
<td><%= myPrice %></td>
<td><%= myDesc %></td>
<%
Next
Set nodes = nothing
Set xmlDoc = nothing
%>
</tr>
</table>
</body>
i'm gettin some errors with the following script and i can't figure out why. it makes it seem like there's a problem with my server, but if i put the same basic code in the middle of the page instead of calling a function, or if i have it use a text file as opposed to xml, there are no errors returned. thanks for any help. lemme know if i should explain it more in detail. thanks again-
<body>
<%
Dim xmlDoc
xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async = false
xmlDoc.load("fountains.xml")
Set nodes = xmlDoc.documentElement.selectNodes("product")
Dim iNode
%>
<table>
<tr>
<%
For each iNode in nodes
Dim myName, myPrice, myDesc
myName = iNode.selectSingleNode("name").text
myPrice = iNode.selectSingleNode("price").text
myDesc = iNode.selectSingleNode("desc").text
%>
<td><%= myName %></td>
<td><%= myPrice %></td>
<td><%= myDesc %></td>
<%
Next
Set nodes = nothing
Set xmlDoc = nothing
%>
</tr>
</table>
</body>