It sounds like you are asking why
myXML.some-node
doesn't give you what you wan. The answer
is that it is actually a subtraction:
myXML.some - node
This isn't a bug; it's just how the . and
- operators work in AS3 and E4X. When a node name isn't a legal AS3 identifier,
you have to either write
myXML["some-node"]
or
myXML.elements("some-node")
- Gordon
Hi,
I was playing with the new AS3 E4X and trying to access the following kind of
XML node:
<some-node>Hi!<some-node>
I can't access this kind of node due to the middle "-" char. This
problem happens in old AS2 XML object too.
In both XML objects (old AS2 and new AS3) we can reach the node using the
following notation (and not dot notation that will be the preferred way):
myXML["some-node"]
Some XML languajes out there use this kind of notation (with "-"
inserted inside node names), so I suppose this is a bug in the way E4X (and old
XML AS2 object) works or I'm missing something. Please tell me If I'm wrong.
If this is a bug, could we expect a fix in the next FP8.5 alpha or beta
version?
Thanks.
C.
--
::| Carlos Rovira
::| http://www.carlosrovira.com
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS