<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>DTD Validation with SAXBuilder()</TITLE>
</HEAD>
<BODY>

<P><FONT FACE="Arial">Hi,<BR>
<BR>
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!!<BR>
<BR>
SAXBuilder builder = new SAXBuilder (true);<BR>
builder.setValidation(true);<BR>
MyErrorHandler handler = new MyErrorHandler();<BR>
builder.setErrorHandler(handler);<BR>
reportsParamDoc = new SAXBuilder().build(file);<BR>
if (!handler.isValid)<BR>
System.exit(-1); </FONT>
</P>

</BODY>
</HTML>