<?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: More XML filtering with E4X in ActionScript 3</title>
	<atom:link href="http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 16 May 2012 17:12:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Ivan</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-16290</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Tue, 30 Aug 2011 02:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-16290</guid>
		<description>Hi, first is really helpfull this article. I´m trying to do something like this

var searchResults:XMLList = xmlData.Rows;
searchResults = searchResults.( attribute(&quot;id&quot;) == 15 &#124;&#124; attribute(&quot;id&quot;) == 16 ); 
This works but i have an Array with the id´s to search somebody know if exist something like the clause &quot;IN&quot; ( SQL ).

searchResults = searchResults.( attribute(&quot;id&quot;) IN [15,16] ); 

if somebody have an idea, I really appreciate.</description>
		<content:encoded><![CDATA[<p>Hi, first is really helpfull this article. I´m trying to do something like this</p>
<p>var searchResults:XMLList = xmlData.Rows;<br />
searchResults = searchResults.( attribute(&#8220;id&#8221;) == 15 || attribute(&#8220;id&#8221;) == 16 );<br />
This works but i have an Array with the id´s to search somebody know if exist something like the clause &#8220;IN&#8221; ( SQL ).</p>
<p>searchResults = searchResults.( attribute(&#8220;id&#8221;) IN [15,16] ); </p>
<p>if somebody have an idea, I really appreciate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-14030</link>
		<dc:creator>Bart</dc:creator>
		<pubDate>Tue, 19 Jul 2011 14:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-14030</guid>
		<description>You can do this with node-name&#039;s too! Usefull if you want to filter a list based on the name&#039;s of the node but want to allow more then one. Note this will mess-up if you have a local variable named &#039;name&#039; (this confuses the scope).
&lt;pre&gt;var list:XMLList = myXML.children().(name() == &#039;nameA&#039; &#124;&#124; name() == &#039;nameB&#039;);&lt;/pre&gt;

You could also combine it with an Array to make it really dynamic, but don&#039;t forget to convert name() to a String! This is because it actually is something else, a QName or Object):
&lt;pre&gt;var allowedNodes:Array = [&#039;nodeA&#039;, &#039;nodeB&#039;, &#039;nodeC&#039;];
var list:XMLList = myXML.children().(allowedNodes.indexOf(name().toString() &gt; -1));&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You can do this with node-name&#8217;s too! Usefull if you want to filter a list based on the name&#8217;s of the node but want to allow more then one. Note this will mess-up if you have a local variable named &#8216;name&#8217; (this confuses the scope).</p>
<pre>var list:XMLList = myXML.children().(name() == 'nameA' || name() == 'nameB');</pre>
<p>You could also combine it with an Array to make it really dynamic, but don&#8217;t forget to convert name() to a String! This is because it actually is something else, a QName or Object):</p>
<pre>var allowedNodes:Array = ['nodeA', 'nodeB', 'nodeC'];
var list:XMLList = myXML.children().(allowedNodes.indexOf(name().toString() &gt; -1));</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-10196</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Mon, 23 May 2011 13:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-10196</guid>
		<description>HI, I am trying to do something like this:


   
      
         
            
            
            
         
         
            
            
            
         		
      
   


[action script]

var filteredList:XMLList = new XMLList();
getUniqueValues2(attribute(&quot;ctyName&quot;),xmlTest, filteredList);

private function getUniqueValues2(value:Object, inputList:XML, outputList:XMLList):void
{
   if(!inputList.contains(value))
      {
         outputList += value;
      }			
}

flash builder is telling me: Call to a possibly undefined method attribute.
Is there a way to pass an attribute in a funtion?  Because when I use your system with: 

tempListColl.source =  xmlTest.descendants().(filteredName = removeDuplicate(attribute(&quot;ctyName&quot;), filteredName));

(removeDuplicate() being a carbon-copy of your addUniqueValues())

The filteredName XMLList has exactly what I want but the tempListColl is unusable. Or maybe I messed up my syntax somewhere.

Very nice tutorial by the way.

Regards,</description>
		<content:encoded><![CDATA[<p>HI, I am trying to do something like this:</p>
<p>[action script]</p>
<p>var filteredList:XMLList = new XMLList();<br />
getUniqueValues2(attribute(&#8220;ctyName&#8221;),xmlTest, filteredList);</p>
<p>private function getUniqueValues2(value:Object, inputList:XML, outputList:XMLList):void<br />
{<br />
   if(!inputList.contains(value))<br />
      {<br />
         outputList += value;<br />
      }<br />
}</p>
<p>flash builder is telling me: Call to a possibly undefined method attribute.<br />
Is there a way to pass an attribute in a funtion?  Because when I use your system with: </p>
<p>tempListColl.source =  xmlTest.descendants().(filteredName = removeDuplicate(attribute(&#8220;ctyName&#8221;), filteredName));</p>
<p>(removeDuplicate() being a carbon-copy of your addUniqueValues())</p>
<p>The filteredName XMLList has exactly what I want but the tempListColl is unusable. Or maybe I messed up my syntax somewhere.</p>
<p>Very nice tutorial by the way.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 12 Very Helpful XML Related Tutorials In ActionScript - Ntt.cc</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1248</link>
		<dc:creator>12 Very Helpful XML Related Tutorials In ActionScript - Ntt.cc</dc:creator>
		<pubDate>Mon, 01 Nov 2010 14:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1248</guid>
		<description>[...] More XML filtering with E4X in ActionScript 3 [...]</description>
		<content:encoded><![CDATA[<p>[...] More XML filtering with E4X in ActionScript 3 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Tynjala</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1247</link>
		<dc:creator>Josh Tynjala</dc:creator>
		<pubDate>Mon, 25 Oct 2010 16:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1247</guid>
		<description>newbie11, there&#039;s no short-hand e4x to sort elements in XML that I know of. you can insert and remove elements, though, so it should be possible.</description>
		<content:encoded><![CDATA[<p>newbie11, there&#8217;s no short-hand e4x to sort elements in XML that I know of. you can insert and remove elements, though, so it should be possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newbie11</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1246</link>
		<dc:creator>newbie11</dc:creator>
		<pubDate>Mon, 25 Oct 2010 08:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1246</guid>
		<description>Hi,

very useful, thank you. I have a question though: Do you know if it&#039;s possible to sort items alphabetically?

example:

&lt;Peter/&gt;
&lt;Astrid/&gt;
&lt;John/&gt;

return
&lt;Astrid/&gt;
&lt;John/&gt;
&lt;Peter/&gt;</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>very useful, thank you. I have a question though: Do you know if it&#8217;s possible to sort items alphabetically?</p>
<p>example:</p>
<p>&lt;Peter/&gt;<br />
&lt;Astrid/&gt;<br />
&lt;John/&gt;</p>
<p>return<br />
&lt;Astrid/&gt;<br />
&lt;John/&gt;<br />
&lt;Peter/&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Getting Advanced with E4X - Josh Talks Flash</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1245</link>
		<dc:creator>Getting Advanced with E4X - Josh Talks Flash</dc:creator>
		<pubDate>Thu, 25 Feb 2010 00:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1245</guid>
		<description>[...] Let&#039;s finish up with the sample XHTML document that I referenced in my second post about E4X. [...]</description>
		<content:encoded><![CDATA[<p>[...] Let&#39;s finish up with the sample XHTML document that I referenced in my second post about E4X. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ignacio</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1244</link>
		<dc:creator>Ignacio</dc:creator>
		<pubDate>Wed, 10 Feb 2010 16:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1244</guid>
		<description>One billion thanks man,

I was stuck in this project for a week because I couldn&#039;t figure out how to obtain the specific information I wanted from the xml source!

Great work, I really appreciate your effort!

Ignacio</description>
		<content:encoded><![CDATA[<p>One billion thanks man,</p>
<p>I was stuck in this project for a week because I couldn&#8217;t figure out how to obtain the specific information I wanted from the xml source!</p>
<p>Great work, I really appreciate your effort!</p>
<p>Ignacio</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: netan</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1243</link>
		<dc:creator>netan</dc:creator>
		<pubDate>Sat, 19 Dec 2009 16:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1243</guid>
		<description>Great thanks..</description>
		<content:encoded><![CDATA[<p>Great thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Tynjala</title>
		<link>http://joshblog.net/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1242</link>
		<dc:creator>Josh Tynjala</dc:creator>
		<pubDate>Sat, 19 Dec 2009 06:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/2007/05/17/filter-xml-data-with-e4x-in-flash-part-2/#comment-1242</guid>
		<description>Netan, I use the &lt;a href=&quot;http://blog.igeek.info/still-fresh/category/wp-plugins/igsyntax-hiliter/&quot; rel=&quot;nofollow&quot;&gt;iG:Syntax Hiliter&lt;/a&gt; plugin. You believe you can use [xml][/xml] tags in your WordPress editor to embed XML.</description>
		<content:encoded><![CDATA[<p>Netan, I use the <a href="http://blog.igeek.info/still-fresh/category/wp-plugins/igsyntax-hiliter/" rel="nofollow">iG:Syntax Hiliter</a> plugin. You believe you can use [xml][/xml] tags in your WordPress editor to embed XML.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

