Contents of xml4c.asp:


<html>
<body>
ASP to read XML from a file.
<p>
Here is the data stored in the file <b>xml4b.xml</b>:
<p>
<toptag><first>1</first><second>2</second><third>3</third></toptag>
<p>
Loading the file using the <i>object-name</i>.load method yields:
<p>

<%
Set xmlsample = Server.CreateObject("Microsoft.XMLDOM")

xmlsample.validateOnParse=True
xmlsample.async=False

xmlsample.load(Server.MapPath("xml4b.xml"))

set xmlsampleroot=xmlsample.documentElement


for i= 0 to xmlsampleroot.ChildNodes.Length-1
response.write "<br>child="+cstr(i)+" value="+xmlsampleroot.childNodes(i).text
next

set xmlsample=nothing
%>
<p>
</body>
</html>

 

 

***** end of file *** printed: 33 lines on: 11/23/2009 6:07:22 AM