Logging an exception and throwing an exception are two distinct things, it is quite common for a library component (xerces in this case) to log a message describing the error encountered and then throw an exception, regardless if the exception is caught or not by calling programs.
In your case adding this line should prevent Xerces from logging:
parser.setErrorHandler(null);