This error can appear when there is no employer ERN in the Emp Stat record for a learner. This can be fixed by adding in the ERN or by putting in 999999999.
FAQ: Why is the error 'XML is not well formed' appearing when trying to submit an ILR batch?
Nikki Snowden