How to set a variable attribute of an xml element in actionscript 3?

cEmmettHodgesq

New Member
Something that should be very easy has been the quest of my day.How do you set a variable attribute of a xml element?This is what I expected to work:\[code\]xmlElement.attribute(variableAttr) = "the variable attribute is set to this string";\[/code\]However, I'm getting some error that this value can only be retrieved as a reference and not set.Ofcourse, the following does not work either as it will look for the attribute named "variableAttr" and not for the attribute named after the value of the variable variableAttr:\[code\]xmlElement.@variableAttr = "example";\[/code\]
 
Top