Comments on: Getting Advanced with E4X https://joshblog.net/2007/06/29/getting-advanced-with-e4x/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: Gabriele Genta https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1281 Sat, 12 Jun 2010 19:11:12 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1281 Your last tip about missing attributes was a life-saver, thanks a lot!

]]>
By: James https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1280 Fri, 19 Mar 2010 21:49:43 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1280 Thank god for a reasonable, understandable explanation to this. Why can’t adobe write things that make sense?

]]>
By: Ways to use E4X to filter data in ActionScript 3 - Josh Talks Flash https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1279 Thu, 25 Feb 2010 01:15:43 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1279 […] Getting Advanced with E4X […]

]]>
By: More XML filtering with E4X in ActionScript 3 - Josh Talks Flash https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1278 Tue, 07 Oct 2008 20:08:59 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1278 […] Getting Advanced with E4X […]

]]>
By: Gino Basso https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1277 Fri, 11 Jan 2008 19:47:32 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1277 Great E4X blogs.

One question: In the example to get all the anchors (links) with a class named “josh”, what if the class attribute was qualified? I’ve yet to come up with a solution.

Also, with regards to namespaces, don’t forget you can use wildcards, as in:

var temp:int = rss.channel.item.*::condition.@temp;
]]>
By: Roger Braunstein https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1276 Wed, 22 Aug 2007 08:30:48 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1276 The other distinction of the highly mysterious default xml namespaceis that it also implicitly sets the namespace on new XML nodes you create. Woot!

]]>
By: reintroducing.com Blogging Receptacle » Blog Archive » E4X Articles https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1275 Fri, 06 Jul 2007 16:31:35 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1275 […] EDIT: Thanks to Josh for pointing out in the comments that he also wrote a third article, more advanced techniques with E4X. […]

]]>
By: Mark https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1274 Thu, 05 Jul 2007 17:21:45 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1274 By block level, I meant function block like local variables, but looking at the docs:
“The specified namespaces are removed from the set of open namespaces when the current code block is exited. ”

it looks like ‘use namespace’ performs the same way

]]>
By: Josh Tynjala https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1273 Thu, 05 Jul 2007 15:21:41 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1273 Thanks, Mark. That’s an interesting one. Very unintuitive syntax, though.

By “block level”, do you mean that it could be scoped to an if statement or any other block, unlike local variables which are always scoped to a function?

]]>
By: Mark https://joshblog.net/2007/06/29/getting-advanced-with-e4x/#comment-1272 Thu, 05 Jul 2007 15:01:25 +0000 http://www.zeuslabs.us/2007/06/29/getting-advanced-with-e4x/#comment-1272 Theres also the block level directive ‘default xml namespace’

if (feedXML.namespace("") != undefined){
    default xml namespace = feedXML.namespace("");
}

This sets your default namespace to the default of the xml your loading. I think it might be more effective then ‘use namespace’ as its got block level scope and is for xml namespaces in particular.

]]>