<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Array methods for XML lists</title>
	<atom:link href="http://eligrey.com/blog/post/array-methods-for-xml/feed" rel="self" type="application/rss+xml" />
	<link>http://eligrey.com/blog/post/array-methods-for-xml</link>
	<description>this instanceof Whitty</description>
	<lastBuildDate>Wed, 17 Feb 2010 21:59:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Prestaul</title>
		<link>http://eligrey.com/blog/post/array-methods-for-xml/comment-page-1#comment-846</link>
		<dc:creator>Prestaul</dc:creator>
		<pubDate>Fri, 24 Jul 2009 11:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://eligrey.com/?p=360#comment-846</guid>
		<description>Thanks for these, they will certainly come in handy in the future.   
 
We developed a web server that sits on IIS, runs pure javascript (through SpiderMonkey) and uses e4x for templating.  I implemented Array.prototype.mapXml and it has proven to be one of the most valuable methods in our arsenal.  It allows us to write code like this: 
 
&lt;pre lang=&quot;javascript&quot; escaped=&quot;true&quot;&gt; 
function renderPeople() { 
    var people = getArrayOfPeopleSomehow(); 
    return &lt;div class=&quot;people&quot;&gt; 
        {people.mapXML(function(person) &lt;div class=&quot;person&quot;&gt;{person.getOtherPeopleStuff()}&lt;/div&gt;} 
        &lt;/div&gt;; 
} 
&lt;/pre&gt;

It is easy to implement and hard to live without once you&#039;ve used it.</description>
		<content:encoded><![CDATA[<p>Thanks for these, they will certainly come in handy in the future.   </p>
<p>We developed a web server that sits on IIS, runs pure javascript (through SpiderMonkey) and uses e4x for templating.  I implemented Array.prototype.mapXml and it has proven to be one of the most valuable methods in our arsenal.  It allows us to write code like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> renderPeople<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #003366; font-weight: bold;">var</span> people <span style="color: #339933;">=</span> getArrayOfPeopleSomehow<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;people&quot;</span><span style="color: #339933;">&gt;</span> 
        <span style="color: #009900;">&#123;</span>people.<span style="color: #660066;">mapXML</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>person<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;person&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #009900;">&#123;</span>person.<span style="color: #660066;">getOtherPeopleStuff</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#125;</span> 
        <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;;</span> 
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It is easy to implement and hard to live without once you&#039;ve used it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
