View Single Post
  #5 (permalink)  
Old December 7th, 2009, 07:35 AM
adamhw adamhw is offline
Authorized User
Points: 405, Level: 7
Points: 405, Level: 7 Points: 405, Level: 7 Points: 405, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default asp to xml

Hi Imar

thanks for that - so would it be something like the below?

<%Response.write("<?xml version=""1.0"" encoding=""utf-8""?>")%>
<%Response.write("<?xml-stylesheet type=""text/css"" href=""css/rss.css"" ?>")%>


<%Response.write("<rss version=""2.0"">")%>
<%Response.write("<channel>")%>

<%Response.write("<title>Biosauce Blog</title>")%>
<%Response.write("<link>http://biosauce.com/blog.asp</link>")%>
<%Response.write("<description>Follow Our Blog</description>")%>
<%Response.write("<lastBuildDate>Mon, 7 Dec 2009 18:37:00 GMT</lastBuildDate>")%>
<%Response.write("<language>en-us</language>")%>


<%

strSQL = "SELECT id, name, email, blogimage, " & _
"threadid, thread, dateadded, detail " & _
"FROM tbl_comments " & _
"WHERE Approved = 1 ORDER BY dateadded DESC"

'response.Write(strSQL)


set rsFeedback = con.execute(strSQL)


if rsFeedback.EOF then

else

do while not rsFeedback.EOF



intid = rsFeedback("id")
strname = rsFeedback("name")
stremail = rsFeedback("email")
strblogimage = rsFeedback("blogimage")
intthreadid = rsFeedback("threadid")
intthread = rsFeedback("thread")
strdateadded = rsFeedback("dateadded")
strfeedback = rsFeedback("detail")
strFeedbacksml = Left(rsFeedback("detail"), 50)


if IsNull (intthreadid) or (intthreadid) = empty then



%>


<%Response.write("<item>")%>
<%Response.Write("<title>Posted by" + strname + "</title>")%>
<%Response.Write("<link>comment_ind.asp?thread=" + intid + "</link>")%>
<%Response.Write("<guid>follow</guid>")%>
<%Response.Write("<pubDate>" + formatdatetime(strdateadded, 2) + "</pubDate>")%>
<%Response.Write("<description>" + strFeedback + "</description>")%>
<%Response.write("</item>")%>
<!-- put more items here -->

<%

else

end if

rsFeedback.movenext()



loop

end if




set rsFeedback = nothing


%>

<%Response.write("</channel>")%>
<%Response.write("</rss>")%>
<%

con.close

set con = nothing

%>


thanks

Adam