<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"></HEAD><BODY><DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I went through the FAQ and I found a post explaining how to proceed to 
validate the xml instance.</DIV>
<DIV>I ran this code using b8 release and I cannot find a way to find if the doc 
is valid once it is built.</DIV>
<DIV>It seems the document is built even if it doesn't comply with the 
dtd.</DIV>
<DIV>
<P>Thanks.</P>
<P>Robert</P>
<P>&nbsp;</P></DIV>
<DIV>
<P><FONT face="Arial, Helvetica, sans-serif"><CODE>SAXBuilder builder 
=<BR>&nbsp; new SAXBuilder("org.apache.xerces.parsers.SAXParser", 
true);<BR>builder.setFeature(<BR>&nbsp; 
"http://apache.org/xml/features/validation/schema", 
true);<BR>builder.setProperty(<BR>&nbsp;&nbsp;"http://apache.org/xml/properties/schema/external-schemaLocation",<BR>&nbsp;&nbsp;"http://www.w3.org/2001/12/soap-envelope 
soap-envelope.xsd" + " " 
+<BR>&nbsp;&nbsp;"http://kevinj.develop.com/weblog/weblog.xsd 
weblog.xsd");<BR>Document doc = builder.build(xml);</CODE></FONT></P>
<P><FONT face="Arial, Helvetica, sans-serif"><CODE>assert (doc. 
???)</CODE></FONT></P>
<P><FONT 
face="Arial, Helvetica, sans-serif"><CODE></CODE></FONT>&nbsp;</P></DIV></BODY></HTML>