Guest User

Untitled

a guest
Jun 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <%@ Language=VBScript %>
  2. <html>
  3. <!-- #include file = "xml_members.inc" -->
  4.  
  5. <body>
  6. <%
  7. Dim fso, a
  8. Set fso = CreateObject("Scripting.FileSystemObject")
  9. set a = fso.CreateTextFile(strFName, true)
  10. set conn=Server.CreateObject("ADODB.Connection")
  11. conn.provider="Microsoft.Jet.OLEDB.4.0;"
  12. conn.open server.mappath("../db/db.mdb")
  13.  
  14. sql="select * from reg"
  15. set rs=conn.Execute(sql)
  16.  
  17. a.WriteLine( "<?xml version= '1.0' encoding = 'iso-8859-1' ?>" )
  18. a.WriteLine( "<?xml-stylesheet href= 'xsl_file.xsl' type= 'text/xsl'?>" )
  19. a.WriteLine( "<kunden_liste>" )
  20. do while not rs.eof
  21.  
  22. a.WriteLine( "<kunde>" )
  23. a.WriteLine( "<Vorname>" & rs("txtVorname") & "</Vorname>" )
  24. a.WriteLine( "<Nachname>" & rs("txtNachname") & "</Nachname>" )
  25. a.WriteLine( "<Ort>" & rs("txtOrt") & "</Ort>")
  26. a.WriteLine( "<PLZ>" & rs("txtPLZ") & "</PLZ>")
  27. a.WriteLine( "<Strasse>" & rs("txtStrasse") & "</Strasse>")
  28. a.WriteLine( "<Nummer>" & rs("txtNr") & "</Nummer>")
  29. a.WriteLine( "<Geschlecht>" & rs("rdoSex") & "</Geschlecht>")
  30. a.WriteLine( "<Haus>" & rs("Haus") & "</Haus>")
  31. a.WriteLine( "<Extras>" & rs("chkextra") & "</Extras>")
  32. a.WriteLine( "<Extrawurst>" & rs("txtExtrawurst") & "</Extrawurst>")
  33. a.WriteLine( "</kunde>" )
  34. rs.movenext()
  35. loop
  36. a.WriteLine( "</kunden_liste>" )
  37. a.Close
  38. rs.close()
  39. conn.close()
  40. set rs = nothing
  41. %>
  42.  
  43. <%
  44. Response.Redirect( "xml_file.xml")
  45. %>
  46. </body>
  47. </html>
Add Comment
Please, Sign In to add comment