J
jbroderick
I have a .asp document on my server it goes as follows
---
<?xml version="1.0" standalone='yes'?>
<Restaurants>
<%
Dim objConn
Dim objRS
set objConn = Server.CreateObject("ADODB.Connection")
set objRS = server.CreateObject("ADODB.recordset")
objconn.open "Driver={SQL
Server};Server=localhost;Uid=user;Pwd=pass;Database=me"
objRS.activeconnection = objConn
objRS.open "SELECT RestaurantName, PremisesAddressLine1 as
Address
FROM tblRestaurantAccounts WHERE franchiseID= 16 and accountstatus=0"
do until objRS.eof
response.write vbtab & "<Restaurant>" & vbcrlf
response.write vbtab & vbtab & "<Shop>" &
objRS.fields("Restaurantname").value & "</Shop>" & vbcrlf
response.write vbtab & vbtab & "<Address>" &
objRS.fields("address").value & "</Address>" & vbcrlf
response.write vbtab & "</Restaurant>" & vbcrlf
objRS.movenext
loop
objRS.close
objConn.close
set objRS = nothing
set objConn = nothing
%>
</Restaurants>
---
the only problem is that it chokes when it gets a record entry that
contains a "&". what code do i need or what modifications to my code to
let this .asp document display a "well-formed" xml document?
thanks for your help
Jonathan Carl Broderick
---
<?xml version="1.0" standalone='yes'?>
<Restaurants>
<%
Dim objConn
Dim objRS
set objConn = Server.CreateObject("ADODB.Connection")
set objRS = server.CreateObject("ADODB.recordset")
objconn.open "Driver={SQL
Server};Server=localhost;Uid=user;Pwd=pass;Database=me"
objRS.activeconnection = objConn
objRS.open "SELECT RestaurantName, PremisesAddressLine1 as
Address
FROM tblRestaurantAccounts WHERE franchiseID= 16 and accountstatus=0"
do until objRS.eof
response.write vbtab & "<Restaurant>" & vbcrlf
response.write vbtab & vbtab & "<Shop>" &
objRS.fields("Restaurantname").value & "</Shop>" & vbcrlf
response.write vbtab & vbtab & "<Address>" &
objRS.fields("address").value & "</Address>" & vbcrlf
response.write vbtab & "</Restaurant>" & vbcrlf
objRS.movenext
loop
objRS.close
objConn.close
set objRS = nothing
set objConn = nothing
%>
</Restaurants>
---
the only problem is that it chokes when it gets a record entry that
contains a "&". what code do i need or what modifications to my code to
let this .asp document display a "well-formed" xml document?
thanks for your help
Jonathan Carl Broderick