Code example for SAXSource

Methods: getInputSource

0
            } 
        } 
 
        private void validateSAXSource(SAXSource source, SAXParser parser, DefaultValidationErrorHandler errorHandler)
                throws SAXException, IOException { 
            parser.parse(source.getInputSource(), errorHandler);
        } 
 
        private SAXParser createSAXParser() {
            try { 
                SAXParser parser = parserFactory.newSAXParser();
                parser.setProperty(SCHEMA_LANGUAGE, schemaLanguage);
                parser.setProperty(SCHEMA_SOURCE, schemaInputSources);
                return parser;
            } 
            catch (ParserConfigurationException ex) {
                throw new XmlValidationException("Could not create SAXParser: " + ex.getMessage(), ex);
            } 
            catch (SAXException ex) {
                throw new XmlValidationException("Could not create SAXParser: " + ex.getMessage(), ex);
            }