<%
xmlfile=server.MapPath("feed.xml")
set fso=server.CreateObject("Scripting.FileSystemObject")
set ifile=fso.CreateTextFile(xmlfile,True)
set objconn=Server.CreateObject("CustShop.ComClass1")
conn=objconn.DataSource()
set rs=Server.CreateObject("ADODB.Recordset")
str="select * from Cust_Shop"
rs.open str,conn,1,1
title="<?xml version=""1.0"" encoding=""GB2312""?>"
rssversion="<rss version=""2.0"">"
cssfile="<?xml-stylesheet type=""text/css"" href=""http://192.168.20.253/rss.css""?>"
ifile.Write(title)
ifile.Writeline(rssversion)
ifile.Writeline(cssfile)
ifile.WriteLine("<channel>")
ifile.writeLine("<title>")
ifile.writeline("店铺信息")
ifile.writeLine("</title>")
ifile.writeLine("<link>")
ifile.writeline("http://www.sohu.com")
ifile.writeLine("</link>")
ifile.writeLine("<Description>")
ifile.writeline("店铺信息说明")
ifile.writeLine("</Description>")
ifile.writeLine("<language>")
ifile.writeline("zh-cn")
ifile.writeLine("</language>")
if not rs.eof then
while not rs.eof
ifile.WriteLine("<item>")
ifile.WriteLine("<title>")
ifile.WriteLine(trim(rs("Shop_Name")))
ifile.WriteLine("</title>")
ifile.WriteLine("<link>")
ifile.WriteLine("http://192.168.20.253/other/zhou/index.asp")
ifile.WriteLine("</link>")
ifile.WriteLine("<description>")
ifile.WriteLine(trim(rs("Shop_About")))
ifile.WriteLine("</description>")
ifile.WriteLine("<pubdate>")
ifile.WriteLine(date)
ifile.WriteLine("</pubdate>")
ifile.WriteLine("</item>")
rs.movenext
wend
end if
ifile.WriteLine("</channel>")
ifile.WriteLine("</rss>")
ifile.close
rs.close
response.Write("<a href=""feed.xml"">查看内容</a>")
%>