So is your OSM source file correct?

Or XML structure defect? Can you open it with a proffesional text editor like notepad++ or PSPad?

You can also try to do your task with a smaller OSM XML file … and do you have enough free disk space?