SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot blackinwhite's Avatar
    Join Date
    Feb 2001
    Location
    Istanbul/Turkey
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating rss file with asp

    I have coded this.
    Code:
    <%
    ' -----------------
    ' RSS FILE
    ' -----------------
    'response.ContentType = "text/xml"
    
    set conn = Server.CreateObject("ADODB.Connection") 
    
    ' 
    strDatabasePath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=xxx;" 
    conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabasePath & ";"
    
    sql="select fldMessageID, fldMessageHeader, fldMessageTitle from tblMessages"
    
    set rs=Conn.Execute(sql)
    rs.MoveFirst()
    
    '----------------
    ' HEADER
    '----------------
    response.write("<?xml version=""1.0""?>")
    response.write("<rss version=""0.91"">")
    ' ---------------
    
    response.write("<channel>")
    
    
    response.write("<title>title</title>")
    response.write("<link>link</link>")
    response.write("<description>description</description>")
    response.write("<language>en-us</language>")
    
    ' -----------------------
    while (not rs.EOF)
      response.write("<item>")
      response.write("<title>" & rs("fldMessageTitle") & "</title>") & vbcrlf & vbcrlf
      response.write("<description>") & vbcrlf
    
      response.write ("<![CDATA[") & vbcrlf
      
      response.write("<p>" & rs("fldMessageHeader") & "</p>") & vbcrlf
      response.write("]]>") & vbcrlf
      response.write("</description>") & vbcrlf
      response.write("<link>http://www.site/messages.asp?message=" & rs("fldMessageId") & "</link>") & vbcrlf & vbcrlf
      response.write("</item>")
      rs.MoveNext()
    wend
    ' ------------------------
    
    
    rs.close() 'clear
    conn.close() ' clear
    
    response.write("</channel>")
    
    response.write("</rss>")
    %>
    but it doesn't work as a rss file.

    do you see any erro, or missing part in that.

  2. #2
    SitePoint Enthusiast anantatman's Avatar
    Join Date
    Apr 2002
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    where is the generated XML?
    Rahul Singh, CEO
    http://www.anant.us
    http://www.anant.us/blog/
    http://community.rainbowportal.net/


  3. #3
    SitePoint Zealot blackinwhite's Avatar
    Join Date
    Feb 2001
    Location
    Istanbul/Turkey
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the url for it is:

    http://www.koniks.com/rss.asp


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •