jalcadmin
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
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
ASKER
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'</fo nt>
<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a01a8'</font>
<p>
<font face="Arial" size=2>Object required: 'Provider=Microsoft.J'</fo
<?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>
ASKER
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><titl e>" & RSnews("releaseTitle")...
and that got me this far.
If anyone has any suggestions I would appreciate it.
Thanks,
Andy
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><titl
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 `
more here
http://www.alt-codes.net/
http://www.expandinghead.net/keycode.html
or use encode method
for < to >
http://www.characterencoder.com/
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 `
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><titl e>" & myReplace(releaseTitle) & ">" & "</title>"
let me know pls.
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><titl
let me know pls.
ASKER
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.
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>
it should be like...
response.write "<item><title>" & myReplace(RSnews("releaseT itle")) ......
change the rest as well
response.write "<item><title>" & myReplace(RSnews("releaseT
change the rest as well
ASKER
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
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 ...
ASKER
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>
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
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&nid=7826</link>
<guid isPermaLink="true">http://www.site.com/news.php?c=2&nid=7826</guid>
<description>AIMCA and SGS College won General Championship of Excel-10<div class=feedflare><a href=http://www.site.org/email.php?c=2&nid=7826><img src=../rss/emailthis.gif border=0></img></a><a href="http://delicious.com/save?jump=yes&partner=addthis&url=http://www.site.com/news.php?c=2%26nid=7826&title=News%20Online%3AAIMCA and SGS College won General Championship of Excel-10"><img src=../rss/add2del.gif border=0></img></a></div></description>
</item>
</channel>
</rss>
>>will have to assign url to the pdf files
i mean link ur pdf files.
i mean link ur pdf files.
ASKER
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.
ASKER
<?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>
ASKER
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><titl e>" & myReplace("releaseTitle") & ">" & "</title>" & VbCrlf
also try to avoid white space/line spacing
response.write"<item><titl
also try to avoid white space/line spacing
ASKER
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.
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>
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.
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>
ASKER
Don't but still didn't work.
typo
change
if(rtitle <> "" then
to
if rtitle <> "" then
and
if(rdate <> "" then
to
if rdate <> "" then
change
if(rtitle <> "" then
to
if rtitle <> "" then
and
if(rdate <> "" then
to
if rdate <> "" then
ASKER
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
strconn.Close
Set strconn=nothing
RSnews.Close
Set RSnews=nothing
to
strconn.Close
Set RSnews=nothing
Set strconn=nothing
ASKER
Still no luck. I still keep getting an error on line 37 which is is this line:
rdate = RSNews("releaseDate")
rdate = RSNews("releaseDate")
check your records pls. date might be empty in 1 or more rows
ASKER
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.
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>
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
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, "&", "&")
s = Replace(s, "'", "'")
s = Replace(s, "'", "'")
s = Replace(s, "’", "'")
s = Replace(s, ",", ",")
s = Replace(s, "`", "`")
s = Replace(s, "‚", "‚")
s = Replace(s, "„", "„")
s = Replace(s, "‘", "‘")
s = Replace(s, "’", "’")
s = Replace(s, "“", "“")
s = Replace(s, "”", "”")
s = Replace(s, "´", "´")
s = Replace(s, "¸", "¸")
s = Replace(s, "-", "-")
s = Replace(s, "_", "_")
s = Replace(s, "?", "?")
s = Replace(s, "–", "–")
s = Replace(s, "—", "—")
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>
sorry i made a mistake
line 27: it should be
myReplace = ""
If (Len(s) = 0) Then
myReplace = ""
Exit Function
line 27: it should be
myReplace = ""
If (Len(s) = 0) Then
myReplace = ""
Exit Function
ASKER
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No luck.
it works. i can see your rss now.
just refresh ur page hit Ctrl+F5 (IE)
just refresh ur page hit Ctrl+F5 (IE)
ASKER
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><descriptio n></descri ption><pub Date>4/15/ 2010</pubD ate></item ><item><ti tle>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><des cription>< /descripti on><pubDat e>4/14/201 0</pubDate ></item><i tem><title >Blues Summit: James Cotton & Friends
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><descriptio
ASKER
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
in opera
opera.gif
opera.gif
ASKER
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.
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
ASKER
I'll go ahead and accept a solution. Once again, thanks a million!
:) all the best
ASKER
A tremendous help and very generous with his/her time.
ASKER
<?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.OL
set conn = server.createobject("ADODB
set RSnews=Server.CreateObject
conn.open strconn
strSQLI="SELECT * FROM tblNewsflash2 ORDER BY Desc"
RSnews.Open strSQLI, conn
%>
<lastBuildDate><%=CurrDate
<ttl>240</ttl>
<%
Do While NOT RSnews.EOF
response.write"<item><titl
response.write"<link>http://www.jalc.org/about/news/2007/pdf/" & pdf & "</link>"
response.write"<descriptio
response.write"<pubDate>" & releaseDate & "</pubDate>"
response.write"</item>"
Loop
strconn.Close
Set strconn=nothing
%>
</channel>
</rss>