SOLVED.
Turns out that parsing float uses CultureInfo to determine what counts as a separator; for example, I'm italian and we typically use comma as separator, so writing the float in the xml file as "1.0" makes it not parsable according to italian CultureInfo. So weight values in the xml file should be separated by comma, not point.
Relevant Stackoverflow question: https://stackoverflow.com/questions/5592950/why-do-i-get-a-formatexception-when-...