/** * @deprecated use {@link #getXMLInputFactory(StAXParserConfiguration)} with * {@link StAXParserConfiguration#STANDALONE} */ public static XMLInputFactory getNetworkDetachedXMLInputFactory() { return getXMLInputFactory(StAXParserConfiguration.STANDALONE); }
/** * Get a cached {@link XMLInputFactory} instance using the specified * configuration and the default cache policy. * * @param configuration * the configuration applied to the requested factory * @return an {@link XMLInputFactory} instance. */ public static XMLInputFactory getXMLInputFactory(StAXParserConfiguration configuration) { return getXMLInputFactory(configuration, isFactoryPerClassLoader); }
/** * Get a cached {@link XMLInputFactory} instance using the default * configuration and the specified cache policy. * * @param factoryPerClassLoaderPolicy * the cache policy; see * {@link #getXMLInputFactory(StAXParserConfiguration, boolean)} * for more details * @return an {@link XMLInputFactory} instance. */ public static XMLInputFactory getXMLInputFactory(boolean factoryPerClassLoaderPolicy) { return getXMLInputFactory(null, factoryPerClassLoaderPolicy); }
/** * Get a cached {@link XMLInputFactory} instance using the default * configuration and cache policy (i.e. one instance per class loader). * * @return an {@link XMLInputFactory} instance. */ public static XMLInputFactory getXMLInputFactory() { return getXMLInputFactory(null, isFactoryPerClassLoader); }
private static XMLInputFactory getXMLInputFactory() { return StAXUtils.getXMLInputFactory(ABDERA_PARSER_CONFIGURATION); }
public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration, String systemId, InputStream in) throws XMLStreamException { XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(systemId, in); if (log.isDebugEnabled()) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; }
public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration, InputStream in, String encoding) throws XMLStreamException { XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in, encoding); if (log.isDebugEnabled()) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; }
public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration, InputStream in) throws XMLStreamException { XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in); if (log.isDebugEnabled()) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; }
public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration, Reader in) throws XMLStreamException { XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in); if (log.isDebugEnabled()) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; }
public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Source source) { if (source instanceof SAXSource) { return createOMBuilder(omFactory, (SAXSource)source, true); } else if (source instanceof DOMSource) { return createOMBuilder(omFactory, ((DOMSource)source).getNode(), true); } else { try { return new StAXOMBuilder(omFactory, StAXUtils.getXMLInputFactory().createXMLStreamReader(source)); } catch (XMLStreamException ex) { throw new OMException(ex); } } }
public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Source source) { if (source instanceof SAXSource) { return createOMBuilder(omFactory, (SAXSource)source, true); } else if (source instanceof DOMSource) { return createOMBuilder(omFactory, ((DOMSource)source).getNode(), true); } else if (source instanceof StreamSource) { return createOMBuilder(omFactory, StAXParserConfiguration.DEFAULT, toInputSource((StreamSource)source)); } else { try { return new StAXOMBuilder(omFactory, StAXUtils.getXMLInputFactory().createXMLStreamReader(source), (Detachable)null, (Closeable)null); } catch (XMLStreamException ex) { throw new OMException(ex); } } }
public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Source source) { if (source instanceof SAXSource) { return createOMBuilder(omFactory, (SAXSource)source, true); } else if (source instanceof DOMSource) { return createOMBuilder(omFactory, ((DOMSource)source).getNode(), true); } else if (source instanceof StreamSource) { return createOMBuilder(omFactory, StAXParserConfiguration.DEFAULT, toInputSource((StreamSource)source)); } else { try { return new StAXOMBuilder(omFactory, StAXUtils.getXMLInputFactory().createXMLStreamReader(source), (Detachable)null, (Closeable)null); } catch (XMLStreamException ex) { throw new OMException(ex); } } }
public SOAPModelBuilder createSOAPModelBuilder(Source source) { if (source instanceof SAXSource) { // TODO: supporting this will require some refactoring of the builders throw new UnsupportedOperationException(); } else if (source instanceof DOMSource) { return new StAXSOAPModelBuilder(this, new DOMXMLStreamReader(((DOMSource)source).getNode(), true), (Detachable)null, (Closeable)null); } else if (source instanceof StreamSource) { return createSOAPModelBuilder(StAXParserConfiguration.SOAP, toInputSource((StreamSource)source)); } else { try { return new StAXSOAPModelBuilder(this, StAXUtils.getXMLInputFactory().createXMLStreamReader(source), (Detachable)null, (Closeable)null); } catch (XMLStreamException ex) { throw new OMException(ex); } } }
public SOAPModelBuilder createSOAPModelBuilder(Source source) { if (source instanceof SAXSource) { // TODO: supporting this will require some refactoring of the builders throw new UnsupportedOperationException(); } else if (source instanceof DOMSource) { return new StAXSOAPModelBuilder(this, new DOMXMLStreamReader(((DOMSource)source).getNode(), true), (Detachable)null, (Closeable)null); } else if (source instanceof StreamSource) { return createSOAPModelBuilder(StAXParserConfiguration.SOAP, toInputSource((StreamSource)source)); } else { try { return new StAXSOAPModelBuilder(this, StAXUtils.getXMLInputFactory().createXMLStreamReader(source), (Detachable)null, (Closeable)null); } catch (XMLStreamException ex) { throw new OMException(ex); } } }