Explicitly cast floats to long as we currently do not plan to support float in Xml_generator and previously the value was implicitly casted to long anyway. Issue #1819