Converting some XML to variables in ASP
Posted on 2004-10-06
Hi, I would like to open a text file containing some XML, looping stuff and putting it in variables. I did dis before in Coldfusion and normally don't work woth ASP. I was hoping for a 'working example' for the following scenario.
Thanks in advance! Floris.
ps. making question difficult. 250 points is ok when asking working example in case like this? tanx.
textfile.xml; xml format; 0..x time a thing struct.
asp file in pseudo code (I'm looking for the real stuff please!-)..)
Dim mVar,myXMLVar, x
x = 1
myXMLVar = openXmlFile("textfile.xml")
While not myXMLVar.End do
myVar = myXMLVar.thing
response.write "thing" & x & ":<br>"
response.write myVar.id & "<br>"
response.write myVar.name & "<br>"
x = x + 1
which should given the xml, then give the output: