added @andreyknupp's useInternalErrors() option to XML parsing too

This allow's invalid XML to be transformed as well. Also changed some indentation.

I simply copied what you did. I have never written a single line of C++, so beware!