homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

RSS From Access Database
How do I create an xml RSS feed from an online access database?

 6:22 pm on Feb 28, 2010 (gmt 0)

I'm trying to create a xml file that automatically updates with all the entries from my Microsoft Access database. It seems like it should be an easy task, but I don't have much experience with xml at all.

My database is hosted online at www.***.com/fpdb/webeditor3.mdb and I just want to retrieve and display the Title and Description fields for all the items from a table in the database called Results.

Can anyone help me out to what the code to use for this is? Would this file be saved as .xml or .asp or .aspx or what? Also, the server I'm using doesn't support PHP, so any solutions using it wouldn't work.



 4:25 am on Mar 1, 2010 (gmt 0)

Welcome to WebmasterWorld radermacgk12.

It's been a while since I've worked with Access, so I won't give you good specifics on that end. However, you should be able to output data to a file that puts data into an RSS or Atom template. For example, you could use the RSS 2.0 Specification [cyber.law.harvard.edu] as a guideline to make a template for the output file. Then you just need to add the appropriate information fields from your database into the corresponding areas of the template.


 5:46 am on Mar 1, 2010 (gmt 0)

bill , is it possible to use an asp file as a feed


 6:34 am on Mar 1, 2010 (gmt 0)

It's an XML file being output, but you could use anything from PHP to ASP to create the file, as long as the final format is correct.


 6:53 am on Mar 1, 2010 (gmt 0)

I can't comment to much on asp specificaly, but you can use almost any server side scripting language to create an xml file. I have done this in the past using php. What I did was create a file called feed.xml this file was in fact a php file with an xml file extension. I was then able to set up the server so that xml was handled in the same way php would be.

When a request was made for feed.xml the php file did its stuff, queried the database and created the output. To the browser or application that was requesting feed.xml they just saw xml output. If you set up your script to create xml style output, and have an xml extenson to the end user/applicaion it will be as good as a true xml file.



 10:36 am on Mar 2, 2010 (gmt 0)

<?xml version="1.0" encoding="ISO-8859-1"?>
<% Response.Buffer = true
Response.ContentType = "text/xml"

Function ApplyXMLFormatting(strInput)
strInput = Replace(strInput,"&", "&amp;")
strInput = Replace(strInput,"'", "'")
strInput = Replace(strInput,"""", "&quot;")
strInput = Replace(strInput, ">", "&gt;")
strInput = Replace(strInput,"<","&lt;")

ApplyXMLFormatting = strInput
End Function

<rss version="2.0">
<copyright>All Rights Reserved.</copyright>
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = Application("forum_system_dsn")

Dim objRS, strSQL, strDesc
strSQL = "sp_GetTop25Posts"
Set objRS = objConn.Execute(strSQL)

Do While Not objRS.EOF
strDesc = "<b>Message by " & objRS("MsgAuthor") & " on " & _
objRS("MsgDate") & " EST</b><br>" & _
objRS("MsgResponse").Value %>

Set objRS = Nothing

Set objRS = Nothing
Set objConn = Nothing


 10:36 am on Mar 2, 2010 (gmt 0)

The File should be saved as an asp file


 5:58 am on Mar 3, 2010 (gmt 0)

No. The file should be saved as XML. You just need to let the server know how to parse the XML file as ASP.


 1:08 am on Mar 4, 2010 (gmt 0)

feedburner accepts the asp file as input. if it saved as a xml file, how it will fetch data from the server side


 1:18 am on Mar 4, 2010 (gmt 0)

There are ways to get your webserver to parse other pages just as if they were ASP. You just need to configure your server to know that .XML files should be parsed the same way an .ASP page would.


 4:25 am on Mar 4, 2010 (gmt 0)

is it mandatory to have the feed as .xml file . can it be .rss file. Still the feeds appear in feedburner


 4:55 am on Mar 4, 2010 (gmt 0)

Feedburner is really off-topic to this thread.

If you want to make an RSS feed from an Access database then you would want to output an XML file in the format of the RSS specification linked to above.


 5:36 am on Mar 4, 2010 (gmt 0)

bill, but do the feed aggregators accept files other than .xml as feeds(if they comply to the specs)


 6:06 am on Mar 4, 2010 (gmt 0)

I'm not sure what you're asking I guess. If the file complied with the XML specs then it would be an XML file.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved