Fix #1689 : Discard wrong XML errors
Merge pull request #935 from romainneutron/fix-1689

[3.8] Fix #1689 : Discard wrong XML errors