Link to home
Start Free TrialLog in
Avatar of jalcadmin
jalcadminFlag for United States of America

asked on

Creating an RSS Feed from Classic ASP

I have found this code to create an RSS feed using classic ASP.  I am using an Access database.  I am, however, feeling completely overwhelmed by this code and whether or not it is even the correct code to use.

http://bytescout.com/products/developer/rss2htmlpro/how_to_display_rss_using_asp.html

As an ASP newbieI'm a bit confused by this code and whether or not this should be saved as an ASP page (which won't validate or really function as an RSS feed) or as an RSS file.

I had read somewhere that you needed to change a setting in IIS to point anything with the file extension .rss to the asp.dll to get this to work.

If there is anyone who might be willing to help me step through, and learn this process I would be most grateful.

Thanks,
Andy
Avatar of jalcadmin
jalcadmin
Flag of United States of America image

ASKER

I have been experimenting on my own.  Here is what I have started with but it is presenting me with a blank rss page.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>

<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews

strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY Desc"
RSnews.Open strSQLI, conn

%>
<lastBuildDate><%=CurrDateT%></lastBuildDate>
<ttl>240</ttl>


<%
Do While NOT RSnews.EOF
response.write"<item><title>" & releaseTitle & ">" & "</title>"
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & pdf & "</link>"
response.write"<description></description>"
response.write"<pubDate>" & releaseDate & "</pubDate>"
response.write"</item>"
Loop
strconn.Close
Set strconn=nothing
%>




</channel>
</rss>
I have modified this slightly (shown below) and am at least starting to see a row of close brackets that are links.  When I look at the source code I see the following:

<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a01a8'</font>
<p>
<font face="Arial" size=2>Object required: 'Provider=Microsoft.J'</font>


<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>

<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews

strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn

%>
<lastBuildDate><%=CurrDateT%></lastBuildDate>
<ttl>240</ttl>


<%
Do While NOT RSnews.EOF
response.write"<item><title>" & releaseTitle & ">" & "</title>"
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & pdf & "</link>"
response.write"<description></description>"
response.write"<pubDate>" & releaseDate & "</pubDate>"
response.write"</item>"
RSnews.movenext
Loop
strconn.Close
Set strconn=nothing
%>




</channel>
</rss>

Open in new window

Small steps being made here.  If you look at this file:

http://www.jalc.org/rss/040810_RSS.rss

It is pulling the data and it is showing it in the source code and in the tags but is not showing them on the screen.  

Also, still getting an error message at the bottom.

Changed:

response.write"<item><title>"  & RSnews("releaseTitle")...

and that got me this far.

If anyone has any suggestions I would appreciate it.

Thanks,
Andy
Whitespace is not allowed at this location.
 Line: 15 Character: 42

<item><title>Blues Summit: James Cotton & Friends


u need to convert all special chars into their alt codes
for ` it would be &#96;
more here
http://www.alt-codes.net/
http://www.expandinghead.net/keycode.html

or use encode method
for  < to  >
http://www.characterencoder.com/
Function myReplace(sText)
    sText = Replace(sText, "'", Chr(130))
    sText = Replace(sText, "<"  , Chr(60))
    sText = Replace(sText, ">"  , Chr(62))
    sText = Replace(sText, "&" , Chr(38))
    sText = Replace(sText, "," , Chr(44))
    sText = Replace(sText, " ", Chr(32))
    myReplace = sText
End Function

usage.

response.write"<item><title>" & myReplace(releaseTitle) & ">" & "</title>"


let me know pls.
OK, I have implemented the function.  Here is the code as it exists now.  I am getting a error '800a01a8'  It says it is expecting an object.  Do strings need to be run through the myReplace function as well?  If so, how would you apply that?

Many thanks for your help.




<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>

<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews

strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn

%>
<lastBuildDate><%=CurrDateT%></lastBuildDate>
<ttl>240</ttl>


<%
Function myReplace(sText)
    sText = Replace(sText, "'", Chr(130))
    sText = Replace(sText, "<"  , Chr(60))
    sText = Replace(sText, ">"  , Chr(62))
    sText = Replace(sText, "&" , Chr(38))
    sText = Replace(sText, "," , Chr(44))
    sText = Replace(sText, " ", Chr(32))
    myReplace = sText
End Function

Do While NOT RSnews.EOF
response.write"<item><title>" & myReplace("releaseTitle") & ">" & "</title>" & "<BR />"
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & myReplace("pdf") & "</link>"& "<BR>"
response.write"<description></description>"& "<BR>"
response.write"<pubDate>" & myReplace("releaseDate") & "</pubDate>"& "<BR>"
response.write"</item>"
RSnews.movenext
Loop
strconn.Close
Set strconn=nothing
RSnews.Close
Set RSnews=nothing
%>




</channel>
</rss>

Open in new window

it should be like...

response.write "<item><title>"  & myReplace(RSnews("releaseTitle")) ......
change the rest as well
OK, have changed that.  It is still not showing up on the screen but is showing up fine in the source code.  When I try and run THAT output directly through the RSS validator I get the following errors:

I don't know how to get the date in the format it is asking for and it also seems to still be choking on an ampersand in one of the titles.

Thank you for your help.

Andy
This feed does not validate.

line 11, column 15: lastBuildDate must be an RFC-822 date-time: [help]

<lastBuildDate></lastBuildDate>               ^line 15, column 107: XML parsing error: <unknown>:15:107: not well-formed (invalid token) [help]

...  Santos in Journey To Brazil on May 28 & 29 </title><BR /><link>http://w ...

Open in new window

I have tried a couple of functions I found online but nothing seems to drop the date (or anything) into those tags.  Here is what I used:


<lastBuildDate>
<%
Function return_RFC822_Date(myDate, offset)
   Dim myDay, myDays, myMonth, myYear
   Dim myHours, myMonths, mySeconds

   myDate = CDate(myDate)
   myDay = WeekdayName(Weekday(myDate),true)
   myDays = Day(myDate)
   myMonth = MonthName(Month(myDate), true)
   myYear = Year(myDate)
   myHours = zeroPad(Hour(myDate), 2)
   myMinutes = zeroPad(Minute(myDate), 2)
   mySeconds = zeroPad(Second(myDate), 2)

   return_RFC822_Date = myDay&", "& _
                                  myDays&" "& _
                                  myMonth&" "& _
                                  myYear&" "& _
                                  myHours&":"& _
                                  myMinutes&":"& _
                                  mySeconds&" "& _
                                  offset
End Function
Function zeroPad(m, t)
   zeroPad = String(t-Len(m),"0")&m
End Function
%>
<%=return_RFC822_Date(Now(), "EST")%>
</lastBuildDate>

Open in new window

ur code works till
http://www.jalc.org/about/news/2007/pdf/

after that it stops
Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'Replace'

/rss/040810_RSS.rss, line 59


but you will have to assign url to the pdf files


date formate should be
<lastBuildDate>Wed, 14 Apr 2010 11:40:10 -0600</lastBuildDate>

ref
http://www.4guysfromrolla.com/webtech/022701-1.shtml

feed sample

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="http://feeds.feedburner.com/~d/styles/rss2full.xsl"?>
<rss version="2.0">
 
 
<channel>
<title>Site title</title>
<link>http://www.site.com</link>
<language>en-us</language>
<description>Description of site</description>
<pubDate>Wed, 14 Apr 2010 11:41:38 -0600</pubDate> 
<lastBuildDate>Wed, 14 Apr 2010 11:41:38 -0600</lastBuildDate> 
<copyright>Copyright: Your company, http://http://www.site.com</copyright> 
<image><url>http://www.site.com/logo.gif</url>
<title>Title of Feed</title>
<link>http://www.site.com</link>
</image>

<item>
<title>AIMCA and SGS College won General Championship of Excel-10</title>
<link>http://www.site.com/news.php?c=2&amp;nid=7826</link>
<guid isPermaLink="true">http://www.site.com/news.php?c=2&amp;nid=7826</guid>
<description>AIMCA and SGS College won General Championship of Excel-10&lt;div class=feedflare&gt;&lt;a href=http://www.site.org/email.php?c=2&amp;nid=7826&gt;&lt;img src=../rss/emailthis.gif border=0&gt;&lt;/img&gt;&lt;/a&gt;&lt;a href="http://delicious.com/save?jump=yes&amp;partner=addthis&amp;url=http://www.site.com/news.php?c=2%26nid=7826&amp;title=News%20Online%3AAIMCA and SGS College won General Championship of Excel-10">&lt;img src=../rss/add2del.gif border=0&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;</description>
</item>

</channel>
</rss>

Open in new window

>>will have to assign url to the pdf files
i mean link ur pdf files.
I'm sorry, I'm not clear on what you mean by "link ur pdf files."  I'm trying to build a link using the beginning of the URL and the name of a file in a database field.
post ur updated code pls.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>

<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews


strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn

%>
<lastBuildDate>
<%
Function return_RFC822_Date(myDate, offset)
   Dim myDay, myDays, myMonth, myYear
   Dim myHours, myMonths, mySeconds

   myDate = CDate(myDate)
   myDay = WeekdayName(Weekday(myDate),true)
   myDays = Day(myDate)
   myMonth = MonthName(Month(myDate), true)
   myYear = Year(myDate)
   myHours = zeroPad(Hour(myDate), 2)
   myMinutes = zeroPad(Minute(myDate), 2)
   mySeconds = zeroPad(Second(myDate), 2)

   return_RFC822_Date = myDay&", "& _
                                  myDays&" "& _
                                  myMonth&" "& _
                                  myYear&" "& _
                                  myHours&":"& _
                                  myMinutes&":"& _
                                  mySeconds&" "& _
                                  offset
End Function
Function zeroPad(m, t)
   zeroPad = String(t-Len(m),"0")&m
End Function
%>
<%=return_RFC822_Date(Now(), "EST")%>
</lastBuildDate>
<ttl>240</ttl>


<%
Function myReplace(sText)
    sText = Replace(sText, "'", Chr(130))
    sText = Replace(sText, "<"  , Chr(60))
    sText = Replace(sText, ">"  , Chr(62))
    sText = Replace(sText, "&" , Chr(38))
    sText = Replace(sText, "," , Chr(44))
    sText = Replace(sText, " ", Chr(32))
    myReplace = sText
End Function

Do While NOT RSnews.EOF
response.write"<item><title>" & myReplace(RSNews("releaseTitle")) & "</title>" & "<BR />"
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & RSNews("pdf") & "</link>"& "<BR>"
response.write"<description></description>"& "<BR>"
response.write"<pubDate>" & myReplace(RSNews("releaseDate")) & "</pubDate>"& "<BR>"
response.write"</item>"
RSnews.movenext
Loop
strconn.Close
Set strconn=nothing
RSnews.Close
Set RSnews=nothing
%>




</channel>
</rss>

Open in new window

I'm studying a video course on ASP and have multiple books here in front of me.  But learning this as I have to implement it is really daunting.  Thank you for the help.

instead of <br/> and <br> use &VbCrlf

response.write"<item><title>" & myReplace("releaseTitle") & ">" & "</title>" & VbCrlf

also try to avoid white space/line spacing
I did as you suggested but still no luck with this.  Still getting an error.  I've left the lastbuilddate blank until I get this first part squared away.

Here is the code as I have it now.  

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>

<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews


strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn
%>
<lastBuildDate>
</lastBuildDate>
<ttl>240</ttl>


<%
Function myReplace(sText)
    sText = Replace(sText, "'", Chr(130))
    sText = Replace(sText, "<"  , Chr(60))
    sText = Replace(sText, ">"  , Chr(62))
    sText = Replace(sText, "&" , Chr(38))
    sText = Replace(sText, "," , Chr(44))
    sText = Replace(sText, " ", Chr(32))
    myReplace = sText
End Function
Do While NOT RSnews.EOF
response.write"<item><title>" & myReplace(RSNews("releaseTitle")) & "</title>" & "<BR />"
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & RSNews("pdf") & "</link>"& VbCrlf
response.write"<description></description>"& VbCrlf
response.write"<pubDate>" & myReplace(RSNews("releaseDate")) & "</pubDate>"& VbCrlf
response.write"</item>"
RSnews.movenext
Loop
strconn.Close
Set strconn=nothing
RSnews.Close
Set RSnews=nothing
%>




</channel>
</rss>

Open in new window

line # 40 : change <BR /> to  VbCrlf

error :
/rss/040810_RSS.rss, line 31

i guess there is an empty field for releaseDate


ok try with below code.


<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>
<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn
%>
<lastBuildDate>
</lastBuildDate>
<ttl>240</ttl>
<%
Function myReplace(sText)
    sText = Replace(sText, "'", Chr(130))
    sText = Replace(sText, "<"  , Chr(60))
    sText = Replace(sText, ">"  , Chr(62))
    sText = Replace(sText, "&" , Chr(38))
    sText = Replace(sText, "," , Chr(44))
    sText = Replace(sText, " ", Chr(32))
    myReplace = sText
End Function
dim rtitle, rdate
Do While NOT RSnews.EOF
rtitle = RSNews("releaseTitle")
rdate = RSNews("releaseDate")
if(rtitle <> "" then	
	response.write"<item><title>" & myReplace(rtitle) & "</title>" &  VbCrlf
end if
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & RSNews("pdf") & "</link>" & VbCrlf
response.write"<description></description>"& VbCrlf
if(rdate <> "" then	
	response.write"<pubDate>" & myReplace(rdate) & "</pubDate>" & VbCrlf
end if
response.write"</item>"
RSnews.movenext
Loop
strconn.Close
Set strconn=nothing
RSnews.Close
Set RSnews=nothing
%>
</channel>
</rss>

Open in new window

Don't but still didn't work.  
typo

change
if(rtitle <> "" then
to
if rtitle <> "" then

and
if(rdate <> "" then

to
if rdate <> "" then

Changed but it still didn't help.
and also change

strconn.Close
Set strconn=nothing
RSnews.Close
Set RSnews=nothing

 to

strconn.Close
Set RSnews=nothing
Set strconn=nothing


Still no luck.  I still keep getting an error on line 37 which is is this line:

rdate = RSNews("releaseDate")
check your records pls. date might be empty in 1 or more rows
OK, a little progress.  I got the first record to show up.  It stops there and is showing a GT symbol.  Not sure where that is in the code (it's not in the record).  

Also, apparently, they occasionally leave the pdf field empty and occasionally the date field (we'll have to correct them on this).  I changed the code as shown below to include an if statement to check to see if the pdf field is empty.  


<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>
<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn
%>
<lastBuildDate>
</lastBuildDate>
<ttl>240</ttl>
<%
Function myReplace(sText)
    sText = Replace(sText, "'", Chr(130))
    sText = Replace(sText, "<"  , Chr(60))
    sText = Replace(sText, ">"  , Chr(62))
    sText = Replace(sText, "&" , Chr(38))
    sText = Replace(sText, "," , Chr(44))
    sText = Replace(sText, " ", Chr(32))
    myReplace = sText
End Function
dim rtitle, rdate
Do While NOT RSnews.EOF
rtitle = RSNews("releaseTitle")
rdate = RSNews("releaseDate")
rpdf = RSNews("pdf")
if rtitle <> "" then	
	response.write"<item><title>" & myReplace(rtitle) & "</title>" &  VbCrlf
end if
if rpdf <> "" then
	response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & RSNews("pdf") & "</link>" & VbCrlf
end if
response.write"<description></description>"& VbCrlf
if rdate <> "" then	
	response.write"<pubDate>" & myReplace(rdate) & "</pubDate>" & VbCrlf
end if
response.write"</item>"
RSnews.movenext
Loop
strconn.Close
Set RSnews=nothing
Set strconn=nothing
%>
</channel>
</rss>

Open in new window

i m getting error
 in Opera on line 52.
and
IE :  Whitespace is not allowed at this location.
 Line: 18 Character: 115
</item><item><title>Mario Adnet and Ouro Negro Perform the Music of Moacir Santos in Journey To Brazil on May 28 & 29 </title>


ok i have changed myReplace function. now try with this below code



<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Jazz at Lincoln Center Press Releases</title>
<link>http://www.jalc.org/about/a_newsflash09.asp</link>
<description>Press Releases from Jazz at Lincoln Center</description>
<language>en-us</language>
<copyright>Copyright 2010 Jazz at Lincoln Center</copyright>
<%
Dim strconn
Dim conn
Dim strSQLI
Dim RSnews
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PEO\JALCdatabases\newsflash.mdb"
set conn = server.createobject("ADODB.connection")
set RSnews=Server.CreateObject("ADODB.Recordset")
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY releaseDate Desc"
RSnews.Open strSQLI, conn
%>
<lastBuildDate>
</lastBuildDate>
<ttl>240</ttl>
<%
Function myReplace(s)
  If (Len(s) = 0) Then
	formatData = ""
  	Exit Function
  End If
	s = Replace(s, "&",   "&#38;")
	s = Replace(s, "'",   "&#39;")
	s = Replace(s, "'",   "&#39;")
	s = Replace(s, "’",   "&#39;")
	s = Replace(s, ",",   "&#44;")
	s = Replace(s, "`",   "&#96;")
	s = Replace(s, "‚",   "&#130;")
	s = Replace(s, "„",   "&#132;")
	s = Replace(s, "‘",   "&#145;")
	s = Replace(s, "’",   "&#146;")
	s = Replace(s, "“",   "&#147;")
	s = Replace(s, "”",   "&#148;")
	s = Replace(s, "´",   "&#180;")
	s = Replace(s, "¸",   "&#184;")
	s = Replace(s, "-",   "&#45;")
	s = Replace(s, "_",   "&#95;")
	s = Replace(s, "?",   "&#63;")
	s = Replace(s, "–",   "&#150;")
	s = Replace(s, "—",   "&#151;")
	s = Replace(s, CHR(10), "<br/>")
	myReplace = s
End Function

dim rtitle, rdate
Do While NOT RSnews.EOF

response.write"<item><title>" & myReplace(rtitle) & "</title>" &  VbCrlf
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & RSNews("pdf") & "</link>" & VbCrlf
response.write"<description></description>"& VbCrlf
response.write"<pubDate>" & myReplace(rdate) & "</pubDate>" & VbCrlf
response.write"</item>"
RSnews.movenext
Loop
'strconn.Close
'Set RSnews=nothing
'Set strconn=nothing
%>
</channel>
</rss>

Open in new window

sorry i made a mistake

line 27: it should be
myReplace = ""


If (Len(s) = 0) Then
      myReplace = ""
        Exit Function
OK, replaced the code and it was still giving me an error in IE about white space on line 16.

Why did you comment out the:
'strconn.Close
'Set RSnews=nothing
'Set strconn=nothing

I removed the ' and it still didn't work.

When it says no white space allowed, where is it referring to that white space?  In a record? In a script?  
ASKER CERTIFIED SOLUTION
Avatar of Emad Gawai
Emad Gawai
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No luck.
it works. i can see your rss now.
just refresh ur page hit    Ctrl+F5 (IE)
That's odd, I'm not seeing anythingin FF, IE, or Safari.  When I look at it in Chrome it shows up unformatted and when I tried it on FF on another machine I could only see the first row with that errant GT symbol.  When I tried it in IE on another machine I get this error:

Whitespace is not allowed at this location.
 Line: 16 Character: 269

></title><link>http://www.jalc.org/about/news/2007/pdf/2010-06-05_J4YP What is Free Jazz.pdf</link><description></description><pubDate>4/15/2010</pubDate></item><item><title>Mario Adnet and Ouro Negro Perform the Music of Moacir Santos in Journey To Brazil on May 28 & 29 ></title><link>http://www.jalc.org/about/news/2007/pdf/</link><description></description><pubDate>4/14/2010</pubDate></item><item><title>Blues Summit: James Cotton & Friends

This is just before where the blank pdf field is.

unfortunately Rss feed does not display in Chrome.

http://www.jalc.org/rss/040810_RSS.rss

attached is the screen shot for ur ref.


ie.gif
That is so odd.  I clicked on your URL in the above message and THEN it opened the RSS fine.  

Could I possibly push my luck and ask for your assistance with populating the lastBuildDate or would you rather I open another request?  I have tried the function in my post #30753888 above, it just shows up blank in the actual feed.  Your recommendation to check out this:
http://www.4guysfromrolla.com/webtech/022701-1.shtml
completely overwhelmed me and didn't make any sense to me.

Thank you so much for all your assistance thus far, you have been very generous.
better u open new question, other experts may also help u for that
I'll go ahead and accept a solution.  Once again, thanks a million!
:) all the best
A tremendous help and very generous with his/her time.