Hi, i am trying to create my own rss feed.
I have got the xml to display in the browser. However, isn't an rss feed supposed to show the links and details in a list so when the user clicks on the link, it's supposed to go to that site?
Can someone help me out doing this and also explain, when i should output it and when i should display it.
I have got the xml to display in the browser. However, isn't an rss feed supposed to show the links and details in a list so when the user clicks on the link, it's supposed to go to that site?
Can someone help me out doing this and also explain, when i should output it and when i should display it.
Code:
<%
response.ContentType = "text/xml"
%>
<!--#include file="..\Connections\Open.asp"-->
<%
dim objrs,strSQL
strSQL = "SELECT * FROM [RSStest]"
set objrs = server.createobject("ADODB.recordset")
objrs.open strSQL, objconn,1, 3
x = 0
For x = 1 to 10
if objrs.eof or objrs.bof then
exit for
else
response.write("<?xml version=""1.0"" encoding=""ISO-8859-1""?>")
response.write("<rss version=""2.0"">")
response.write("<news>")
while (not objrs.EOF)
Response.Write "<item>"
Response.Write "<title>" & objrs("Title") & "</title>"
Response.Write "<link>" & objrs("Link") & "</link>"
Response.Write "<description>" & objrs("description") & "</description>"
Response.Write "<pubDate>" & objrs("date") & "</pubDate>"
Response.Write "</item>"
objrs.MoveNext()
wend
response.write("</news>")
response.write("</rss>")
end if
Next
objrs.close()
%><!--#include file="..\Connections\Close.asp"-->
