http://qs321.pair.com?node_id=1113740


in reply to Re: Ignoring not well-formed (invalid token) errors
in thread Ignoring not well-formed (invalid token) errors

If the errors you're seeing fit on single lines and follow some patterns - like in the example you've shown - it might suffice to filter the bad file through something simple like say
perl -ne 'print $_ if not m/^<es\s*$/' <bad_input.file >corrected_inpu +t.file
That 'ignores' the fact that there's anything about XML and as such could be fast enough to be usable, even if it is an extra step.

Krambambuli