Hi,
I am trying to validate the XML with DTD with the following code. I wrote an invalidate xml for testing, but the code did not catch it (where MyErrorHandler extends BuilderErrorHandler). Can you tell what went wrong? Thanks!!
SAXBuilder builder = new SAXBuilder (true);
builder.setValidation(true);
MyErrorHandler handler = new MyErrorHandler();
builder.setErrorHandler(handler);
reportsParamDoc = new SAXBuilder().build(file);
if (!handler.isValid)
System.exit(-1);