Validate XML with XSD Schema with DOMBuilder

<[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
Hi,

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 ?
Here my code : 

public int validXMLWithDOM(File xmlFile) 
    {
        try
        {
            DOMParser dom           = new DOMParser();    //Instanciation d'un élément DOM
            DOMBuilder jdomParser   = new DOMBuilder("org.apache.xerces.parsers.DOMParser");   //Instanciation d'un élément JDOM
            
            //Parse le document afin de récupérer un arbre DOM
            dom.setFeature("http://xml.org/sax/features/validation", true);
            dom.parse("Durand.xml");  
            
            org.w3c.dom.Document docDom  = dom.getDocument();
            //Récupération de notre arbre JDOM
            org.jdom.Element jdomDoc = jdomParser.build(docDom.getDocumentElement());
            
         }
        catch(DOMParseException e)
        {
            e.printStackTrace();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
      
        return 0;   
    }

Where is the problem ? How Can I get the error with DOMParseException ?

Thanks

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.