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')

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
Complete this form and then pat yourself on the back.