Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Language=VBScript %>
- <html>
- <!-- #include file = "xml_members.inc" -->
- <body>
- <%
- Dim fso, a
- Set fso = CreateObject("Scripting.FileSystemObject")
- set a = fso.CreateTextFile(strFName, true)
- set conn=Server.CreateObject("ADODB.Connection")
- conn.provider="Microsoft.Jet.OLEDB.4.0;"
- conn.open server.mappath("../db/db.mdb")
- sql="select * from reg"
- set rs=conn.Execute(sql)
- a.WriteLine( "<?xml version= '1.0' encoding = 'iso-8859-1' ?>" )
- a.WriteLine( "<?xml-stylesheet href= 'xsl_file.xsl' type= 'text/xsl'?>" )
- a.WriteLine( "<kunden_liste>" )
- do while not rs.eof
- a.WriteLine( "<kunde>" )
- a.WriteLine( "<Vorname>" & rs("txtVorname") & "</Vorname>" )
- a.WriteLine( "<Nachname>" & rs("txtNachname") & "</Nachname>" )
- a.WriteLine( "<Ort>" & rs("txtOrt") & "</Ort>")
- a.WriteLine( "<PLZ>" & rs("txtPLZ") & "</PLZ>")
- a.WriteLine( "<Strasse>" & rs("txtStrasse") & "</Strasse>")
- a.WriteLine( "<Nummer>" & rs("txtNr") & "</Nummer>")
- a.WriteLine( "<Geschlecht>" & rs("rdoSex") & "</Geschlecht>")
- a.WriteLine( "<Haus>" & rs("Haus") & "</Haus>")
- a.WriteLine( "<Extras>" & rs("chkextra") & "</Extras>")
- a.WriteLine( "<Extrawurst>" & rs("txtExtrawurst") & "</Extrawurst>")
- a.WriteLine( "</kunde>" )
- rs.movenext()
- loop
- a.WriteLine( "</kunden_liste>" )
- a.Close
- rs.close()
- conn.close()
- set rs = nothing
- %>
- <%
- Response.Redirect( "xml_file.xml")
- %>
- </body>
- </html>
Add Comment
Please, Sign In to add comment