Category: XML

Caching in Google Gadgets

When creating a Google gadget that pulls data from an XML file, you will probably notice that the data doesn’t update right away in the gadget even after you have changed the file. This caching behavior can make it very difficult to troubleshoot, and you’ll probably want to shut it off while developing.
It took me a while to find this so I’m posting it here:

From Google’s “Refreshing the Cache” instructions:


To make sure your gadget fetches fresh new content at least once per interval, simply specify a value (measured in seconds) for the refreshInterval parameter. For example:
// Fetch fresh content every half hour
_IG_FetchContent("http://news.google.com/?output=rss", callback, { refreshInterval: (60 * 30) });

// Fetch fresh content every 10 minutes
_IG_FetchContent("http://news.google.com/?output=rss", callback, { refreshInterval: (60 * 10) });

// Fetch fresh content every 30 seconds
_IG_FetchContent("http://news.google.com/?output=rss", callback, { refreshInterval: 30 });

// Disable caching completely and fetch fresh content every time --  !! Try to avoid using this !!
_IG_FetchContent("http://news.google.com/?output=rss", callback, { refreshInterval: 0 });

function callback(response) { ... } 


Continue reading

Synch video with slides in Adobe Presenter

In my search for the best way to synch video with slides, I’ve tried a number of different software packages. At this time, I’ve settled on the Rich Media Project’s flash extensions as the most reliable way to create synched presentations, but I’m always looking for a better way.

When I came across Adobe Presenter, it seemed like another promising tool for this purpose, and possibly easier for clients to use than anything else so far.

Unfortunately it does not yet seem to be the case, at least not yet. When I tried to sync a video of a lecture with a powerpoint using Presenter, it proved to be a hopelessly frustrating and tedious task.

Continue reading

Including HTML data in an xml document

When developing an xml-based application, you may come across the need to include HTML data in xml nodes. The problem is that unless this data is escaped in some way, it is interpreted as xml and will cause a malformed structure. The easiest way I’ve found so far to use a CDATA attribute to escape the code automatically. Then, when you are creating an xsl fragment to edit or display the data, use

Continue reading