status-machine for xml loading