Fixed xml attributes when some parameters are empty