I have a function that has this line:
var returnString:String = items[0].@month;
@month is an attibute on an XML node like so:
<xmlnode month="JAN"/>
OK but I need to abstract the attribute name so I can pass a string to the function and get the contents of the attribute with the name matching the string I passed. So for example If I call the function like this function("stone") it returns items[0].@stone. I hope this is clear.
Does anyone know how to do what I am after?
Thanks.