<?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: Sorting a XMLListCollection in Flex</title>
	<atom:link href="http://www.parallelcoding.com/2008/10/20/sorting-a-xmllistcollection-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.parallelcoding.com/2008/10/20/sorting-a-xmllistcollection-in-flex/</link>
	<description>Intelligent, Efficient, Parallel, and Sustainable Code</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:21:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: home security system reviews</title>
		<link>http://www.parallelcoding.com/2008/10/20/sorting-a-xmllistcollection-in-flex/comment-page-1/#comment-9796</link>
		<dc:creator>home security system reviews</dc:creator>
		<pubDate>Tue, 10 May 2011 12:20:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.parallelcoding.com/?p=35#comment-9796</guid>
		<description>WONDERFUL Post.thanks for share..extra wait .. …</description>
		<content:encoded><![CDATA[<p>WONDERFUL Post.thanks for share..extra wait .. …</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angeline Lilian Suarez</title>
		<link>http://www.parallelcoding.com/2008/10/20/sorting-a-xmllistcollection-in-flex/comment-page-1/#comment-9540</link>
		<dc:creator>Angeline Lilian Suarez</dc:creator>
		<pubDate>Sun, 01 May 2011 15:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.parallelcoding.com/?p=35#comment-9540</guid>
		<description>There has to be another ways to connect with your site without having following to the RSS? I am not sure exactly why however I can’t obtain the RSS packed in the reader however I can get it through the browser.</description>
		<content:encoded><![CDATA[<p>There has to be another ways to connect with your site without having following to the RSS? I am not sure exactly why however I can’t obtain the RSS packed in the reader however I can get it through the browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Green</title>
		<link>http://www.parallelcoding.com/2008/10/20/sorting-a-xmllistcollection-in-flex/comment-page-1/#comment-671</link>
		<dc:creator>Robert Green</dc:creator>
		<pubDate>Mon, 02 Nov 2009 22:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.parallelcoding.com/?p=35#comment-671</guid>
		<description>I&#039;m not sure if there is or not, but your code seems quite sufficient to do the job. I&#039;m planning on looking at this when I get some free time as, currently, my life is pretty much sucked up by my PhD studies. Thanks for the comment!</description>
		<content:encoded><![CDATA[<p>I'm not sure if there is or not, but your code seems quite sufficient to do the job. I'm planning on looking at this when I get some free time as, currently, my life is pretty much sucked up by my PhD studies. Thanks for the comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.parallelcoding.com/2008/10/20/sorting-a-xmllistcollection-in-flex/comment-page-1/#comment-669</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 02 Nov 2009 18:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.parallelcoding.com/?p=35#comment-669</guid>
		<description>Very helpful. I was having trouble finding a solution to this and am very new to flex and ActionScript. Thanks very much. 

One question/idea though - I had some xml that had nested child nodes wherein I could pass in a node name and sort that way. 

However, other times, I had XML with no nested child nodes - so in this code, I couldn&#039;t see how to access them. 

I modified it slightly then to allow $element to be null. And if $element was null I did a loop like so:

//sometimes the element you want to sort is the only element and I can&#039;t seem to identify it any other way.
				if ($element == null){
					for (var i:int = 0; i &lt; $xml.length(); i++){
					   object = {
	data	: $xml[i],
	order 	: $xml[i]
   };

   xmlArray.push(object);
					}	
} else {
   ...your original loop code...
}

Is there a better/easier way?
Thanks again!</description>
		<content:encoded><![CDATA[<p>Very helpful. I was having trouble finding a solution to this and am very new to flex and ActionScript. Thanks very much. </p>
<p>One question/idea though - I had some xml that had nested child nodes wherein I could pass in a node name and sort that way. </p>
<p>However, other times, I had XML with no nested child nodes - so in this code, I couldn't see how to access them. </p>
<p>I modified it slightly then to allow $element to be null. And if $element was null I did a loop like so:</p>
<p>//sometimes the element you want to sort is the only element and I can't seem to identify it any other way.<br />
				if ($element == null){<br />
					for (var i:int = 0; i &lt; $xml.length(); i++){<br />
					   object = {<br />
	data	: $xml[i],<br />
	order 	: $xml[i]<br />
   };</p>
<p>   xmlArray.push(object);<br />
					}<br />
} else {<br />
   ...your original loop code...<br />
}</p>
<p>Is there a better/easier way?<br />
Thanks again!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

