XML parsers, by and large, require well formatted XML. Since XML is so sensitive to formatting then there is no easy way to do this and pretty much every solution is going to require that you string manipulate the file first and then try to read it in as XML. Of course you could try to read the XML first and then respond accordingly but that would only make sense if errors are rare.
If you consistently have the same errors for a given XML provider then you might need to set up some custom error handling for the very specific scenarios. Handling them all is unrealistic (even heuristically). Things like xmlns:=
makes sense as being converted to xmlns=
but this would be just one possible issue.
Ultimately I agree with AgaveJoe that you should contact the vendor and have them fix their XML. But in some cases this isn't possible or just takes too long to wait.