'Response.CharSet="gb2312" '数据集 Response.ContentType="text/xml" '数据流格式定义 Response.ContentType="application/xml" Response.Expires=0 Response.write sXmlClear Response.write sRssHead Dim Conn Set Conn = Server.CreateObject("Adodb.Connection") Conn.Open ConnStr Dim sql Sql="select Top "& RssNewsList_PageSize &" Title,FilePath,AddTime,KeyWord,Content,Classtitle,EditorTitle From view_NewsInfo where Del=0 Order By addTime DESC" Set Rs=Server.CreateObject("ADODB.RecordSet") Rs.open sql,conn,1,2 IF RS.EOF AND RS.BOF Then Response.Write("<item></item>") Else do while not rs.eof Response.Write("<item>")&RS("Title") Response.Write("<title><![CDATA["&Rs("Title")&"]]></title>") Response.Write("<description><![CDATA["&RS("KeyWord")&"]]>") Response.Write("<content><![CDATA["&RS("Content")&"]]></content>") Response.Write("<link>" &url&RS("FilePath")&"</link>") Response.Write("<subject>"&RS("Classtitle")&"</subject>") Response.Write("<creator>"&RS("EditorTitle")&"</creator>") Response.Write("<date>"&RS("addtime")&"</date>") Response.Write("</description></item>") RS.MoveNext loop end if rs.close set rs=nothing Response.write sRssEnd %>