/** * Load the {@link Document} at the supplied {@link InputSource} using the standard JAXP-configured * XML parser. */ @Override public Document loadDocument(InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware) throws Exception { DocumentBuilderFactory factory = createDocumentBuilderFactory(validationMode, namespaceAware); if (logger.isTraceEnabled()) { logger.trace("Using JAXP provider [" + factory.getClass().getName() + "]"); } DocumentBuilder builder = createDocumentBuilder(factory, entityResolver, errorHandler); return builder.parse(inputSource); }
/** * Load the {@link Document} at the supplied {@link InputSource} using the standard JAXP-configured * XML parser. */ @Override public Document loadDocument(InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware) throws Exception { DocumentBuilderFactory factory = createDocumentBuilderFactory(validationMode, namespaceAware); if (logger.isTraceEnabled()) { logger.trace("Using JAXP provider [" + factory.getClass().getName() + "]"); } DocumentBuilder builder = createDocumentBuilder(factory, entityResolver, errorHandler); return builder.parse(inputSource); }
/** * Load the {@link Document} at the supplied {@link InputSource} using the standard JAXP-configured * XML parser. */ public Document loadDocument(InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware) throws Exception { DocumentBuilderFactory factory = createDocumentBuilderFactory(validationMode, namespaceAware); if (logger.isDebugEnabled()) { logger.debug("Using JAXP provider [" + factory.getClass().getName() + "]"); } DocumentBuilder builder = createDocumentBuilder(factory, entityResolver, errorHandler); return builder.parse(inputSource); }
@Override protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware) throws ParserConfigurationException { DocumentBuilderFactory factory = super.createDocumentBuilderFactory(validationMode, namespaceAware); try { factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false); } catch (Throwable e) { // we can get all kinds of exceptions from this // due to old copies of Xerces and whatnot. } return factory; }
@Override protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware) throws ParserConfigurationException { DocumentBuilderFactory factory = super.createDocumentBuilderFactory(validationMode, namespaceAware); try { factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false); } catch (Throwable e) { // we can get all kinds of exceptions from this // due to old copies of Xerces and whatnot. } return factory; }
@Override protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware) throws ParserConfigurationException { DocumentBuilderFactory factory = super.createDocumentBuilderFactory(validationMode, namespaceAware); try { factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false); } catch (Throwable e) { // we can get all kinds of exceptions from this // due to old copies of Xerces and whatnot. } return factory; }
@Override protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware) throws ParserConfigurationException { DocumentBuilderFactory factory = super.createDocumentBuilderFactory(validationMode, namespaceAware); try { factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false); } catch (Throwable e) { // we can get all kinds of exceptions from this // due to old copies of Xerces and whatnot. } return factory; }
@Override protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware) throws ParserConfigurationException { DocumentBuilderFactory factory = super.createDocumentBuilderFactory(validationMode, namespaceAware); try { factory.setAttribute(JAXP_SCHEMA_SOURCE, BLUEPRINT_SCHEMA); } catch (IllegalArgumentException ex) { log.warn("Cannot work with attribute " + JAXP_SCHEMA_SOURCE + " - configurations w/o a schema locations will likely fail to validate", ex); } return factory; } }
/** * Load the {@link Document} at the supplied {@link InputSource} using the standard JAXP-configured * XML parser. */ @Override public Document loadDocument(InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware) throws Exception { DocumentBuilderFactory factory = createDocumentBuilderFactory(validationMode, namespaceAware); if (logger.isDebugEnabled()) { logger.debug("Using JAXP provider [" + factory.getClass().getName() + "]"); } DocumentBuilder builder = createDocumentBuilder(factory, entityResolver, errorHandler); return builder.parse(inputSource); }