Home > Features > Using jQuery to Display XML Feeds • Bookmark   • Newsletters   • Register Search Options


Using jQuery to Display XML Feeds

Using jQuery to Display XML Feeds

January 1, 2012
Text size: 
View in Digital Mag
Get XBIZ News
XBIZ Research
Will virtual reality boost the paysite market?
Yes, it will soon
Yes, but in a few years
Out of 168 votes. Results based on votes submitted by members of XBIZ.net social network.

" If you want to make short work out of a huge pile of data, jParse may be the solution. "

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?

Gabriele Romanato offers an intriguing RSS feed rotator using jQuery at OnWeb-Dev (onwebdev.blogspot.com /2011/04/jquery-rss-feedrotator.html). This approach utilizes a server-side PHP script to call the desired feeds, displayed via jQuery’s AJAX methods, then using a JavaScript timer to specify the intervals between the feeds being displayed.

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.


E-Stim Basics: Selling Customers on Powerboxes as Pleasure Tools

Electrosex is a commonly misunderstood pleasure practice for good reason: Most of us have negative associations with electricity; maybe we’ve been shocked after rubbing our feet across a carpeted... More »

Search Oftentimes Is Left to Chance

Adult content is frowned upon in search, whether in paid, organic or social. With the big algo updates from the past few years, Google has cleaned up search, trying to get rid of spammy and low-quality... More »

Five Tips to Generate Repeat Business

A $50 sale is great. But what if you could get that same $50 sale to come back four times in the next few months? Here are some ideas how to achieve that. 1) On your receipts, you should have an option... More »
Stay informed of the latest industry developments. Get XBIZ newsletters delivered to your inbox. Subscribe today!
Enter email address:

* To manage existing subscriptions click here.

Submit your press release to
multiple news outlets with 1 click.
Subscribe to RSS news feeds or
add free content to your website.
Access XBIZ news and articles
with your mobile device.
Subscribe to XBIZ Premiere magazine, the industry's leading adult retail trade publications, delivering the most timely and comprehensive business news and information to producers and retailers of adult products.


XBIZ 2017

Jan 09 - Jan 13
Hollywood, CA

XBIZ Awards 2017

Jan 12 - Jan 12
Los Angeles, CA

ANME Founders Show

Jan 14 - Jan 15
Los Angeles Marriott Burbank Airport

Everything To Do With Sex Show

Jan 20 - Jan 22
Montréal, Québec
Everyday thousands of business professionals browse XBIZ's industry directory for quality products and services. Not listed yet? Your company could be losing potential new business. Submit your company today!
Use XBIZ RSS feeds to stay informed of the latest industry developments or as a content syndication tool for your website!