Added function xmlAttrToInt.