AS3 and E4X — Tricks with a great XML parsing tool.

E4X in AS3 is (and has been) a great addition to AS3. It has been covered time and time again, so I’m going to put in some helpful links with hints that I find.

Kirupa’s take on E4X in AS3
Senocular on E4X in AS3

What if you come across a minus sign in an attribute? You certainly can’t do my.node.@my-attr because that won’t work. However, you can use my.node.attribute(‘my-attr’). So to recap:

Broken: my.node.@my-attr

Works: my.node.attribute(‘my-attr’)

Leave a comment

Your email address will not be published. Required fields are marked *