Importing RSS Feed Into FileMaker with XSLT

Bookmark and Share

Update:

Per popular request I am revisiting this article. I made some edits and also now you can download the the demo file.

Someone sent an email to our FileMaker group to request information about importing RSS feed into FileMaker. Since I have done this and it’s actually quite easy, I thought I’d post the method here.

Ingredients

  1. FileMaker (8.5 or later because you need Web Viewer);
  2. A FileMaker database ;
  3. An XSLT style sheet; (I found this style sheet somewhere some time ago; didn’t write it myself)
  4. A web host where you can post the XSLT file;
  5. An RSS feed that actually works with this (e.g. Yahoo Stocks: http://rss.news.yahoo.com/rss/stocks);
  6. A script that pulls the info (which now can be run on server if you have FMS 9 or 10);
  7. A table in your DB for storing the RSS feeds;
  8. A portal on your layout that shows the list of RSS feeds;
  9. A web viewer in your database that can display the resulted web page;
  10. A script that tells the web viewer to show the requested article.

rss-example

Directions

  1. Create a new table called ‘RSS_Feed’ in your solution (since this only works in FM 8.5 and later, there’s no need for a separate file). Create the following fields: ID, Title, Description, Link, PubDate, SelectedLink;
  2. Link the new table to your preferred table (Global, Solution, etc.) by showing all records (‘x’ symbol);
  3. Create a new layout in your solution, place a portal on it showing the records from the RSS Feed table (link and description fields, minimum). Place a web viewer next to it. Name your web viewer object “article”;
  4. Create a script similar to this example to refresh the feed (you can run this script from a button on your layout or at certain intervals from the server):
  5. Go to Layout [ "Layout Name" (Table Name) ]
    Enter Browse Mode
    Show All Records
    Delete All Records
    [ No dialog ]
    Import Records [ XML (from http): http://rss.news.yahoo.com/rss/stocks; XSL (from http): http://www.website.com/folder/rss2fmp.xsl ]
    [ No dialog ]
    Go to Layout [ original layout ]
    
  6. Create a script for showing the article:
  7. 
    Set Field [ RSS_Feed::SelectedLink; RSS_Feed::Link ]
    Set Web Viewer [ Object Name: "article"; URL: RSS_Feed::SelectedLink ]
    
  8. Turn your title field on your portal into a button and link to perform the script above.

This is most likely not the only method; it may not be the best method either. It is, however a working method.

Any questions, suggestions, feel free to respond.

Related posts you might be interested in reading:

  1. Demo of the FMTouch iPhone App with a FileMaker database agnes-riley-fmtouch-presentation Photo by Sandy Hechtman December 11, 2008: Agnes Riley presented a...
  • http://none Rod

    Thanks for the post. Is FMP 10 (not the server edition) capable of importing RSS feeds using this or a similar technique? Thanks

    • Agnes Riley

      You’re welcome, Rod. This technique should work the same exact way in FM10. The good thing about 10 is that you can actually schedule the import script to run periodically on the server, so your users won’t have to do it.

      Agi

  • Pingback: Importing RSS Feed Into FileMaker with XSLT – Take Two | a g i r i l e y . c o m

  • http://www.laurenkuhlman.com Lauren Kuhlman

    Just wanted to say thanks. That helped me out. I got one of the sites I wanted working by just changing the website address. I can’t quite seem to get the second working with your original XSLT file. I guess I better go read up on how XSLT works.

    • Agnes Riley

      You’re welcome. Yeah, XSLT is tricky. I found this style sheet somewhere some time ago; didn’t write it myself. I should probably edit my post to say that. :-)


Client Testimonials

  • “Although the database (which was essentially the lifeline of our business) was not easily recoverable, Agnes did not give up and was able to recover our files after many attempts and hour of persistence Not only did she recover our files, she guided us through the recovery, updated us to present and prepared us so that will never happen again.”

    Chelsea Communications

  • “ZeroBlue translated our needs and ideas into a very attractive, functional, and professional website that is well received by our collaborators and the investment community.”

    Advaxis, Pharmaceutical Company

  • “I received very detailed summaries of the hours that were worked on; which is not always the case with other developers I have worked with. Always available and clearly willing to go the extra mile to make us happy.”

    LPM, Packaging Products

Latest Tweets

Certification logos