Code example for SAXParseException

Methods: getMessage

0
            this.skipTargetNamespaceException = skipTargetNamespaceExeption;
        } 
 
        public void error(SAXParseException exception)
            throws SAXException { 
            if (skipTargetNamespaceException && exception.getMessage()
                .startsWith("TargetNamespace.2: Expecting no namespace, but the schema document has a target name")) {
                    return; 
            } 
 
            errors.add(exception);
        } 
 
        public void fatalError(SAXParseException exception)
            throws SAXException { 
            errors.add(exception);
        } 
 
        public void warning(SAXParseException exception)
            throws SAXException { 
            //do nothing