<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<STYLE></STYLE>
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 10pt; COLOR: #000080; PADDING-TOP: 15px; FONT-FAMILY: Palatino Linotype"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true" acc_role="text"
name="Compose message area">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I have a big problem with DOMBuilder. I want to parse an XML document and
validate it with a XML Schema but with DOMBuilder it can't do it. Why ?</DIV>
<DIV>Here my code : </DIV>
<DIV> </DIV>
<DIV>public int validXMLWithDOM(File xmlFile) <BR>
{<BR>
try<BR>
{<BR>
DOMParser dom = new
DOMParser(); //Instanciation d'un élément
DOM<BR>
DOMBuilder jdomParser = new
DOMBuilder("org.apache.xerces.parsers.DOMParser"); //Instanciation
d'un élément
JDOM<BR>
<BR> //Parse
le document afin de récupérer un arbre
DOM<BR>
dom.setFeature("<A title=http://xml.org/sax/features/validation
href="http://xml.org/sax/features/validation">http://xml.org/sax/features/validation</A>",
true);<BR>
dom.parse("Durand.xml");
<BR>
<BR>
org.w3c.dom.Document docDom =
dom.getDocument();<BR>
//Récupération de notre arbre
JDOM<BR>
org.jdom.Element jdomDoc =
jdomParser.build(docDom.getDocumentElement());<BR> <BR> }<BR>
catch(DOMParseException e)<BR>
{<BR>
e.printStackTrace();<BR>
}<BR> catch(Exception
e)<BR>
{<BR>
e.printStackTrace();<BR>
}<BR>
<BR> return 0;
<BR> }</DIV>
<DIV> </DIV>
<DIV>Where is the problem ? How Can I get the error with DOMParseException
?</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV></BODY></HTML>