attributeToString function

Converts XML attributes.