Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Globalization
Imports System.Resources
Imports System.Threading
Imports System.Reflection
Imports System.Data
Imports System.Data.OleDb
Imports System.Configuration
Imports Microsoft.VisualBasic
Imports System.Xml
...................
Sub Bindata()
Dim cap As Integer
Dim loc As String
Dim mappa As String
cap = Request("cap")
loc = Request("loc")
..................
Dim sqlmappa As String = "select Mappa from Capmappe where cap=" & cap & " and localita='" & loc & "'"
Dim CmdMappa As New OleDbCommand(sqlmappa, Conn)
Dim Rmappa As OleDbDataReader = CmdMappa.ExecuteReader()
If Rmappa.Read() Then
mappa = Rmappa("mappa")
End If
Dim xmlmappa As XmlTextWriter
xmlmappa = New XmlTextWriter(Server.MapPath("mappa.xml"), Nothing)
xmlmappa.WriteStartDocument()
xmlmappa.Formatting = Formatting.Indented
xmlmappa.Indentation = 1
xmlmappa.WriteStartElement("CapMappe")
xmlmappa.WriteStartElement("Mappa")
xmlmappa.WriteElementString("url", mappa)
xmlmappa.WriteEndElement()
xmlmappa.WriteEndElement()
xmlmappa.Flush()