....
Okay, my guess is the following:
- the library ain't initialized when you overwrite the default handlers
(purist viewpoint you should use NULL, not 0)
- then you call xmlParseFile()
- the library notes it's not initialized, then call xmlInitParser();
- and the default xmlDefaultSAXHandler.error and warning get overwritten
try to call xmlInitParser() before resetting the xmlDefaultSAXHandler fields.
Another way is to reset the default error callback to your own
routine with xmlSetGenericErrorFunc() and make that routine do nothing
(usually trivial ;-)