how come the following does not work

var myString:String = "Test data";
var myXml:XML = <Option value="{myString}"></option>
//not string substituion occurs, "{myString}" is just inserted as a
literal.

but this does:

var myString:String = "Test data";
var myXml:XML = <Option>{myString}</option>
// {myString} is property repaced wiht the text "Test data"... as I
would expect.

For some reason i can't bind or use the {} notation when creating an XML
object and trying to assign attributes of an element... but it does work
when i use the {} notation to insert text between the begin and end tags
of a node.

Am i doing something wrong?  Or is this a limitation.... seems silly if
it is.

Reply via email to