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:
xmlElement.attribute(variableAttr) = "the variable attribute is set to this string";
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:
xmlElement.@variableAttr = "example";