Copy link to clipboard
Copied
I created (I thought) a feed that reads my database and creates an XML document. I then linked the XML document to my browser, which displays the contents fine and appears to work just like any other RSS feed. Except, when the database changes, and the XML document is updated, my browser RSS dropdown does not update. This happens in both IE and Firefox. Any ideas?
<cfquery name="getAdvancedCf" datasource="mySource">
SELECT *
FROM announcements_rss
WHERE ID=91
</cfquery>
<!--- Map the orders column names to the feed query column names. --->
<cfset columnMapStruct = StructNew()>
<cfset columnMapStruct.publisheddate = "ANNOUNCE_DATE">
<cfset columnMapStruct.content = "DETAILS">
<cfset columnMapStruct.title = "SUBJECT">
<cfset columnMapStruct.rsslink = "URL">
<!--- Set the feed metadata. --->
<cfset meta.title = "My Title">
<cfset meta.link = "http://feedlink">
<cfset meta.description = "Orders at the art gallery">
<cfset meta.version = "rss_2.0">
<!--- Create the feed. --->
<cffeed action="create"
query="#getAdvancedCf#"
properties="#meta#"
columnMap="#columnMapStruct#"
xmlvar="rssXML"
outputFile = "feed.xml"overwrite = "yes"
>
<cfdump var="#XMLParse(rssXML)#">
Copy link to clipboard
Copied
Two things still puzzle me. What do you mean by "when the database changes" and "browser RSS dropdown"?
Copy link to clipboard
Copied
The values in the database populate the feed. When a new news item is entered into the database, and it refreshes the XML document, my "browswer drop down" does not update. What I mean by browser dropdown is in Firefox and IE, I have my RSS feeds bookmarked as icons on my toolbar. So I hover over them, and the drop down shows the news items.
Copy link to clipboard
Copied
Perhaps <meta http-equiv="refresh"> to refresh the page or AJAX code to refresh the page when the feed refreshes.
Copy link to clipboard
Copied
If the XML file is updated on the server, shouldn't my RSS link in my browser refresh as well? I would think when I click on the RSS link in my browser's toolbar, it would retrieve the XML file and rebuilt it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now