Using jQuery to Display XML Feeds
Attractively displaying data feeds on a website is a great use for jQuery, with several techniques available for doing so, both hard coded and via plugins — the choice of which depends upon your specific needs. Here are a couple examples for inspiration:
According to its publisher, jParse (jparse.kylerush.net) is a jQuery plugin that allows users to parse XML fetched via the .ajax method, making it fully customizable, easy to use and lightweight at only 4KB. The plugin’s website notes that jQuery .ajax calls are not permitted across domain names, so the XML file to be parsed must be on the same domain as the plugin.
If you want to make short work out of a huge pile of data, jParse may be the solution.
But what if the feeds you want to display are not from the same domain that you wish to show them on?
Because the feed fetching process can be relatively time-consuming, CSS is used to hide certain elements during retrieval — revealing them individually after a preset delay.
This is an interesting method that offers a lot of flexibility in execution and which could prove useful, for example, to adult affiliates seeking to customize and aggregate a sponsor’s marketing feeds.
A bit of searching will turn up a variety of other examples of cross-domain scripting, including sample PHP proxies that fetch RSS feeds from multiple servers.