attributeToDouble function

Converts XML attributes.