Accessing E4X nodes having special characters in name without breaking binding chain in flex.
Posted
by Jonas
on Stack Overflow
See other posts from Stack Overflow
or by Jonas
Published on 2010-04-16T10:34:24Z
Indexed on
2010/04/16
19:43 UTC
Read the original article
Hit count: 312
I am using E4X to bind some values from xml in flex 3.
There is a problem when xml tag's (or attribute's) name has special character in it: having xml content
var xml:XML = <tag>
<special-name att="val" />
</tag>
special-name
could not be accessed using xml.special-name.@att
because it is interpreted as subtraction, on the other hand using square bracket notation xml['special-name'].@att
breaks binding chain.
Is there an elegant way to solve this (like special language syntax) without writing custom binding setters and listeners?
© Stack Overflow or respective owner