<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Witheringtree &#187; Firefox</title>
	<atom:link href="http://www.witheringtree.com/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.witheringtree.com</link>
	<description>If a tree falls in the forest and no one is around to hear it fall… yeah, it still makes a sound.</description>
	<lastBuildDate>Sat, 05 May 2012 15:15:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>XML Namespaces With jQuery (Solved)</title>
		<link>http://www.witheringtree.com/2009/05/xml-namespaces-with-jquery-solved/</link>
		<comments>http://www.witheringtree.com/2009/05/xml-namespaces-with-jquery-solved/#comments</comments>
		<pubDate>Mon, 04 May 2009 15:52:50 +0000</pubDate>
		<dc:creator>David Freerksen</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.witheringtree.com/?p=273</guid>
		<description><![CDATA[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 &#8230; <a href="http://www.witheringtree.com/2009/05/xml-namespaces-with-jquery-solved/" title="Continue reading">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have come to this post, you are in the same situation I was in. Many Javascript/AJAX framesworks like <a href="http://jquery.com" target="_blank">jQuery</a> do not work with XML namespaces. I came upon an instance at work where I needed to display data from an RSS feed from <a href="http://creator.zoho.com/" target="_blank">Zoho Creator</a>. 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.</p>
<p>This is a sample output of the RSS feed from Zoho with the data replaced with dots:</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243; ?&gt;<br />
&lt;rss version=&#8221;2.0&#8243; xmlns:zc=&#8221;http://creator.zoho.com/rss/&#8221;&gt;<br />
<span style="white-space: pre;"> </span>&lt;channel&gt;<br />
<span style="white-space: pre;"> </span>&lt;title&gt;…&lt;/title&gt;<br />
<span style="white-space: pre;"> </span>&lt;link&gt;…&lt;/link&gt;<br />
<span style="white-space: pre;"> </span>…<br />
<span style="white-space: pre;"> </span>&lt;item&gt;<br />
<span style="white-space: pre;"> </span>&lt;title&gt;…&lt;/title&gt;<br />
<span style="white-space: pre;"> </span>&lt;link&gt;…link&gt;<br />
<span style="white-space: pre;"> </span>&lt;description&gt;…&lt;/description&gt;<br />
<span style="white-space: pre;"> </span>&lt;guid isPermaLink=&#8221;true&#8221;&gt;…&lt;/guid&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:image&gt;…&lt;/zc:image&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:location&gt;…&lt;/zc:location&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:startdate&gt;…&lt;/zc:startdate&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:enddate&gt;…&lt;/zc:enddate&gt;<br />
<span style="white-space: pre;"> </span>&lt;/item&gt;<br />
<span style="white-space: pre;"> </span>…<br />
<span style="white-space: pre;"> </span>&lt;/channel&gt;<br />
&lt;/rss&gt;</p>
<p>What I was doing with jQuery was looping over the “item” nodes using the jQuery <span style="font-style: italic;">each()</span> method as such:</p>
<p>var items = $(data).find(&#8220;item&#8221;);<br />
jQuery.each(items, function(i)<br />
{<br />
<span style="white-space: pre;"> </span>alert($(this).find(&#8220;location&#8221;).text())<br />
});</p>
<p>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:</p>
<p>var items = $(data).find(&#8220;item&#8221;);<br />
jQuery.each(items, function(i)<br />
{<br />
<span style="white-space: pre;"> </span>alert($(this).find(&#8220;[@nodeName=zc:location]&#8220;).text())<br />
});</p>
]]></content:encoded>
			<wfw:commentRss>http://www.witheringtree.com/2009/05/xml-namespaces-with-jquery-solved/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

