I have a basic ASP page that reads a XML file. The files consists of same data fields, but more than once.
EX:
Program INDI
Title Baster
SubTitle Fun Time
Desc blah blah blah
Program MONSTER
Title Medic
Subtitle TimeOut
Desc blash blah blah
Basically I want to take all the data and put them in separate forms, each one with a submit button. Once i submit it, the data will be entered into an access database. I am now able to read the XML file and write the data to the DB, but only 1 of the entries. I will probably need to create a loop, but don't know how. Anyone can help me here PLEASE?
THANK YOU
Code so far:
<% @Language = "VBScript" %>
<% Response.buffer = true %>
<%
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.load (Server.MapPath("Programs.xml"))
Dim program, title, subtitle, desc
program = xml.documentElement.childNodes(0).text
title = xml.documentElement.childNodes(1).text
subtitle = xml.documentElement.childNodes(2).text
desc = xml.documentElement.childNodes(3).text
Set xml = Nothing
%>
<form action="ProgramSubmit.asp" method="post">
<input name="title" value="<%= title %>" type="text">
<input name="program" value="<%= program %>" type="text">
<input name="subtitle" value="<%= subtitle %>" type="text">
<textarea name="desc" width="400"><%= desc %></textarea>
<input type="submit" name="Submit" value="Submit">
</form>
EX:
Program INDI
Title Baster
SubTitle Fun Time
Desc blah blah blah
Program MONSTER
Title Medic
Subtitle TimeOut
Desc blash blah blah
Basically I want to take all the data and put them in separate forms, each one with a submit button. Once i submit it, the data will be entered into an access database. I am now able to read the XML file and write the data to the DB, but only 1 of the entries. I will probably need to create a loop, but don't know how. Anyone can help me here PLEASE?
THANK YOU
Code so far:
<% @Language = "VBScript" %>
<% Response.buffer = true %>
<%
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.load (Server.MapPath("Programs.xml"))
Dim program, title, subtitle, desc
program = xml.documentElement.childNodes(0).text
title = xml.documentElement.childNodes(1).text
subtitle = xml.documentElement.childNodes(2).text
desc = xml.documentElement.childNodes(3).text
Set xml = Nothing
%>
<form action="ProgramSubmit.asp" method="post">
<input name="title" value="<%= title %>" type="text">
<input name="program" value="<%= program %>" type="text">
<input name="subtitle" value="<%= subtitle %>" type="text">
<textarea name="desc" width="400"><%= desc %></textarea>
<input type="submit" name="Submit" value="Submit">
</form>