I think it is the "-".  But either way, if you can't change the
attribute name, then Ryan's approach is good.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

________________________________

From: [email protected] [mailto:[email protected]] On
Behalf Of Ryan Graham
Sent: Tuesday, February 10, 2009 11:55 AM
To: [email protected]
Subject: RE: [flexcoders] XML attributes

 

It doesn't like the final keyword in there I believe. When you need to
add attributes or properties that use actionscript keywords, drop back
to string keys for access:

 

m_xml["@final-note"] = "8";

 

HTH,

Ryan

 

From: [email protected] [mailto:[email protected]] On
Behalf Of mihksoft
Sent: Tuesday, February 10, 2009 5:58 AM
To: [email protected]
Subject: [flexcoders] XML attributes

 

Hi!

I have an XML
var m_xml:XML = <note></note>;
I want to add the attribute final-note to this XML to result
<note final-note="8"></note>.

I didn't find how to add attributes like this.
I tried m_x...@final-note = "8" but is not working.

Any idea?

Thanks,
Mihai

This message is private and confidential. If you have received it in
error, please notify the sender and remove it from your system.



Reply via email to