Correct xml errors