List of usage examples for org.apache.commons.digester.parser GenericParser newSAXParser
public static SAXParser newSAXParser(Properties properties) throws ParserConfigurationException, SAXException, SAXNotRecognizedException
SAXParser
configured to support XML Scheman and DTD From source file:org.codehaus.enunciate.config.EnunciateConfiguration.java
/** * Create the digester.// w ww . j a v a 2 s.c o m * * @return The digester that was created. */ protected Digester createDigester() throws SAXException { try { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(false); factory.setValidating(false); Properties properties = new Properties(); properties.put("SAXParserFactory", factory); // properties.put("schemaLocation", EnunciateConfiguration.class.getResource("enunciate.xsd").toString()); // properties.put("schemaLanguage", "http://www.w3.org/2001/XMLSchema"); SAXParser parser = GenericParser.newSAXParser(properties); return new Digester(parser); } catch (ParserConfigurationException e) { throw new SAXException(e); } }