V
vunet.us
How to generate pure XML page with ASP?
This try gave me an error:
XML Parsing Error: not well-formed
Location: http://www.worldincatalog.com/manage/edit_item_xml.asp?itemid=15
Line Number 2, Column 26: <font face="Arial" size=2>
-------------------------^
<% @ Language="VBScript" %>
<%
Option Explicit
Response.Buffer = True
Response.ContentType = "text/xml"
' Start XML document.
Response.Write "<?xml version=""1.0""?>" & vbCrLf
%>
<!-- #Include file="adocon.inc" -->
<%
Set rsItem = Server.CreateObject("ADODB.Recordset")
ItemSQL = "...xxx..."
rsItem.Open ItemSQL, adoCon
if not rsItem.eof then
Response.Write "<ItemXML>" & vbCrLf
Response.Write "<ItemID>"&rsItem("ItemID")&"</ItemID>" &
vbCrLf
Response.Write "</ItemXML>" & vbCrLf
end if
rsItem.close
set rsItem = nothing
set ItemSQL = nothing
set adoCon = nothing
%>
This try gave me an error:
XML Parsing Error: not well-formed
Location: http://www.worldincatalog.com/manage/edit_item_xml.asp?itemid=15
Line Number 2, Column 26: <font face="Arial" size=2>
-------------------------^
<% @ Language="VBScript" %>
<%
Option Explicit
Response.Buffer = True
Response.ContentType = "text/xml"
' Start XML document.
Response.Write "<?xml version=""1.0""?>" & vbCrLf
%>
<!-- #Include file="adocon.inc" -->
<%
Set rsItem = Server.CreateObject("ADODB.Recordset")
ItemSQL = "...xxx..."
rsItem.Open ItemSQL, adoCon
if not rsItem.eof then
Response.Write "<ItemXML>" & vbCrLf
Response.Write "<ItemID>"&rsItem("ItemID")&"</ItemID>" &
vbCrLf
Response.Write "</ItemXML>" & vbCrLf
end if
rsItem.close
set rsItem = nothing
set ItemSQL = nothing
set adoCon = nothing
%>