When Java's XML parser - the one you get from:
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = f.newDocumentBuilder();
Doesn't like what it is being fed during a parse, you see the above message on the console.
Why in the world, did someone take it upon themselves to do this and not pass this as an Exception instead? If you don't happen to be staring at the console (the likely case for server programs), you will never know that you have a problem.
I've seen this problem all over the web, but the responses have been about how to fix the XML. I would be interested in how to fix the parser so that it lets us know about the problem. (I would also be interested in twisting the ear of the programmer that did this, but that's beside the point : ).
Does someone know how I can 'catch' these error messages?
Thanks,
Kevin
Edited by: KevinRyan on Nov 16, 2010 6:14 AM
Edited by: KevinRyan on Nov 16, 2010 6:27 AM