Package com.sun.msv.verifier.util

Examples of com.sun.msv.verifier.util.IgnoreErrorHandler


        DOM2toSAX2 d2s = new DOM2toSAX2();
        Verifier v = new Verifier(
          new REDocumentDeclaration(grammar),
          debug?
            (ErrorHandler)new ErrorHandlerImpl():
            (ErrorHandler)new IgnoreErrorHandler() );
        d2s.setContentHandler(v);
        d2s.traverse(dom);
       
        if( createError && !v.isValid() )  break;
        if( !createError && v.isValid() )  break;
View Full Code Here


                        // gets the verifier
                        Verifier verifier = schema.newVerifier();
                   
                        // set the error handler. This object receives validation errors.
                        // you can pass any class that implements org.sax.ErrorHandler.
                        verifier.setErrorHandler( new IgnoreErrorHandler() );

                        // use the verify method to validate documents.
                        // or you can validate SAX events by using the getVerifierHandler method.
                        if(verifier.verify(fileName))
                            System.out.println(fileName+" is valid");
View Full Code Here

TOP

Related Classes of com.sun.msv.verifier.util.IgnoreErrorHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.