ClaireJones
Programmer
<%LANGUAGE="VBScript"%>
<%
'Open database connection
dim Cn
dim Rs
Set Cn = Server.CreateObject("ADODB.Connection"
Cn.Open "Organizer"
Set Rs = Server.CreateObject("ADODB.Recordset"
Set Rs = Cn.Execute("Select * From Schedule"
dim strXML
strXML = ""
'Write XML content to variable strXML
strXML = strXML & "<?xml version='1.0'?>"
strXML = strXML & "<Agenda>"
Do until rs.EOF
strXML = strXML & "<Events>"
strXML = strXML & " <date>"
strXML = strXML & " <Day>" & rs.fields("nDay"
& "</Day>"
strXML = strXML & " <Month>" & rs.fields("nMonth"
& "</Month>"
strXML = strXML & " <Year>" & rs.fields("nYear"
& "</Year>"
strXML = strXML & " </date>"
strXML = strXML & " <Event>"
strXML = strXML & " <Time>" & rs.fields("nStartTime"
& "</Time>"
strXML = strXML & " <Title>" & rs.fields("nEvent"
& " </Title>"
strXML = strXML & " <Location>" & rs.fields("nLocation"
& " </Location>"
strXML = strXML & " <Comment>" & rs.fields("nText"
& " </Comment>"
strXML = strXML & " </Event>"
strXML = strXML & "</Events>"
rs.MoveNext
Loop
strXML = strXML & "</Agenda>"
'Close and deallocate objects
Rs.Close
Set Rs = Nothing
Cn.Close
'Load the XML into an XML object
Set data = Server.CreateObject("Microsoft.XMLDOM"
data.loadXML(strXML)
dataPath = Server.MapPath("Agenda.xml"
data.save(dataPath)
%>
<%
'Open database connection
dim Cn
dim Rs
Set Cn = Server.CreateObject("ADODB.Connection"
Cn.Open "Organizer"
Set Rs = Server.CreateObject("ADODB.Recordset"
Set Rs = Cn.Execute("Select * From Schedule"
dim strXML
strXML = ""
'Write XML content to variable strXML
strXML = strXML & "<?xml version='1.0'?>"
strXML = strXML & "<Agenda>"
Do until rs.EOF
strXML = strXML & "<Events>"
strXML = strXML & " <date>"
strXML = strXML & " <Day>" & rs.fields("nDay"
strXML = strXML & " <Month>" & rs.fields("nMonth"
strXML = strXML & " <Year>" & rs.fields("nYear"
strXML = strXML & " </date>"
strXML = strXML & " <Event>"
strXML = strXML & " <Time>" & rs.fields("nStartTime"
strXML = strXML & " <Title>" & rs.fields("nEvent"
strXML = strXML & " <Location>" & rs.fields("nLocation"
strXML = strXML & " <Comment>" & rs.fields("nText"
strXML = strXML & " </Event>"
strXML = strXML & "</Events>"
rs.MoveNext
Loop
strXML = strXML & "</Agenda>"
'Close and deallocate objects
Rs.Close
Set Rs = Nothing
Cn.Close
'Load the XML into an XML object
Set data = Server.CreateObject("Microsoft.XMLDOM"
data.loadXML(strXML)
dataPath = Server.MapPath("Agenda.xml"
data.save(dataPath)
%>