If you have come to this post, you are in the same situation I was in. Many Javascript/AJAX framesworks like jQuery do not work with XML namespaces. I came upon an instance at work where I needed to display data from an RSS feed from Zoho Creator. Part of the problem was some of the nodes had default namespaces and others had custom namespaces. I needed to access the data in the custom namespaces and it just wouldn’t work in Firefox or IE. It worked just fine in Safari.
This is a sample output of the RSS feed from Zoho with the data replaced with dots:
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<rss version=”2.0″ xmlns:zc=”http://creator.zoho.com/rss/”>
<channel>
<title>…</title>
<link>…</link>
…
<item>
<title>…</title>
<link>…link>
<description>…</description>
<guid isPermaLink=”true”>…</guid>
<zc:image>…</zc:image>
<zc:location>…</zc:location>
<zc:startdate>…</zc:startdate>
<zc:enddate>…</zc:enddate>
</item>
…
</channel>
</rss>
What I was doing with jQuery was looping over the “item” nodes using the jQuery each() method as such:
var items = $(data).find(“item”);
jQuery.each(items, function(i)
{
alert($(this).find(“location”).text())
});
The problem was that this only worked in Safari. In Firefox and IE nothing was returned. Firefox and IE don’t like the custom namespaces. The only way I have found to get this to work is to use this method:
var items = $(data).find(“item”);
jQuery.each(items, function(i)
{
alert($(this).find(“[@nodeName=zc:location]“).text())
});

Thanks, I needed this exact solution (in Safari, actually since I had multiple nodes with different namespaces and needed to select one and not the other).
This was a lifesaver! Thank you!
There’s nothing better than a good and succinct example. Congratulations!
Thanks!
Good idea of article. I’m from Ireland I read many arts about it. I think idea of article is quite best and impresive to think about this article and future. Best regards from Denmark.