public abstract class XMLInputFactory extends java.lang.Object
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| javax.xml.stream.isValidating | Controls DTD validation | Boolean | Boolean.FALSE | no |
| javax.xml.stream.isNamespaceAware | Controls namespace processing for XML 1.0 | Boolean | Boolean.TRUE | true is required, false is optional |
| javax.xml.stream.isCoalescing | Controls coalescing (normalization of adjacent character data) | Boolean | Boolean.FALSE | yes |
| javax.xml.stream.isReplacingEntityReferences | Controls replacement of entity references with their replacement text | Boolean | Boolean.TRUE | yes |
| javax.xml.stream.isSupportingExternalEntities | Controls whether to resolve external entities | Boolean | not specified | yes |
| javax.xml.stream.supportDTD | Controls whether to support DTDs | Boolean | Boolean.TRUE | yes |
| javax.xml.stream.reporter | javax.xml.stream.XMLReporter | yes | ||
| javax.xml.stream.resolver | javax.xml.stream.XMLResolver | yes | ||
| javax.xml.stream.allocator | javax.xml.stream.util.XMLEventAllocator | yes |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALLOCATOR
Property used to control the event allocator implementation.
|
static java.lang.String |
IS_COALESCING
Property used to control whether to coalesce adjacent text events.
|
static java.lang.String |
IS_NAMESPACE_AWARE
Property used to control namespace support.
|
static java.lang.String |
IS_REPLACING_ENTITY_REFERENCES
Property used to control whether to replace entity references with
their replacement text.
|
static java.lang.String |
IS_SUPPORTING_EXTERNAL_ENTITIES
Property used to control whether to resolve external entities.
|
static java.lang.String |
IS_VALIDATING
Property used to control DTD validation.
|
static java.lang.String |
REPORTER
Property used to control the error reporter implementation.
|
static java.lang.String |
RESOLVER
Property used to control the entity resolver implementation.
|
static java.lang.String |
SUPPORT_DTD
Property used to indicate whether to support DTDs.
|
| Modifier | Constructor and Description |
|---|---|
protected |
XMLInputFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract XMLEventReader |
createFilteredReader(XMLEventReader reader,
EventFilter filter)
Create a new filtered reader.
|
abstract XMLStreamReader |
createFilteredReader(XMLStreamReader reader,
StreamFilter filter)
Create a new filtered reader.
|
abstract XMLEventReader |
createXMLEventReader(java.io.InputStream stream)
Creates a new event reader.
|
abstract XMLEventReader |
createXMLEventReader(java.io.InputStream stream,
java.lang.String encoding)
Creates a new event reader.
|
abstract XMLEventReader |
createXMLEventReader(java.io.Reader reader)
Creates a new event reader.
|
abstract XMLEventReader |
createXMLEventReader(javax.xml.transform.Source source)
Creates a new event reader.
|
abstract XMLEventReader |
createXMLEventReader(java.lang.String systemId,
java.io.InputStream stream)
Creates a new event reader.
|
abstract XMLEventReader |
createXMLEventReader(java.lang.String systemId,
java.io.Reader reader)
Creates a new event reader.
|
abstract XMLEventReader |
createXMLEventReader(XMLStreamReader reader)
Creates a new event reader.
|
abstract XMLStreamReader |
createXMLStreamReader(java.io.InputStream stream)
Creates a new stream reader.
|
abstract XMLStreamReader |
createXMLStreamReader(java.io.InputStream stream,
java.lang.String encoding)
Creates a new stream reader.
|
abstract XMLStreamReader |
createXMLStreamReader(java.io.Reader reader)
Creates a new stream reader.
|
abstract XMLStreamReader |
createXMLStreamReader(javax.xml.transform.Source source)
Creates a new stream reader.
|
abstract XMLStreamReader |
createXMLStreamReader(java.lang.String systemId,
java.io.InputStream stream)
Creates a new stream reader.
|
abstract XMLStreamReader |
createXMLStreamReader(java.lang.String systemId,
java.io.Reader reader)
Creates a new stream reader.
|
abstract javax.xml.stream.util.XMLEventAllocator |
getEventAllocator()
Returns the event allocator.
|
abstract java.lang.Object |
getProperty(java.lang.String name)
Returns the implementation-specific property of the given name.
|
abstract XMLReporter |
getXMLReporter()
Returns the error reporter.
|
abstract XMLResolver |
getXMLResolver()
Returns the entity resolver.
|
abstract boolean |
isPropertySupported(java.lang.String name)
Indicates whether the specified property is supported.
|
static XMLInputFactory |
newInstance()
Creates a new factory instance.
|
static XMLInputFactory |
newInstance(java.lang.String factoryId,
java.lang.ClassLoader classLoader)
Creates a new factory instance.
|
abstract void |
setEventAllocator(javax.xml.stream.util.XMLEventAllocator allocator)
Sets the event allocator.
|
abstract void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the implementation-specific property of the given name.
|
abstract void |
setXMLReporter(XMLReporter reporter)
Sets the error reporter.
|
abstract void |
setXMLResolver(XMLResolver resolver)
Sets the entity resolver.
|
public static final java.lang.String IS_NAMESPACE_AWARE
public static final java.lang.String IS_VALIDATING
public static final java.lang.String IS_COALESCING
public static final java.lang.String IS_REPLACING_ENTITY_REFERENCES
public static final java.lang.String IS_SUPPORTING_EXTERNAL_ENTITIES
public static final java.lang.String SUPPORT_DTD
public static final java.lang.String REPORTER
public static final java.lang.String RESOLVER
public static final java.lang.String ALLOCATOR
protected XMLInputFactory()
public static XMLInputFactory newInstance() throws FactoryConfigurationError
FactoryConfigurationErrornewInstance(String,ClassLoader)public static XMLInputFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError
javax.xml.stream.XMLInputFactory system
property$JAVA_HOME/lib/stax.properties fileMETA-INF/services/javax.xml.stream.XMLInputFactory
system resourcefactoryId - name of the factory, same as a property nameclassLoader - the class loader to useFactoryConfigurationError - if an instance of this factory
cannot be loadedpublic abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLStreamReader createXMLStreamReader(javax.xml.transform.Source source) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.Reader reader) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.Reader reader) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(javax.xml.transform.Source source) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException
XMLStreamExceptionpublic abstract XMLResolver getXMLResolver()
public abstract void setXMLResolver(XMLResolver resolver)
public abstract XMLReporter getXMLReporter()
public abstract void setXMLReporter(XMLReporter reporter)
public abstract void setProperty(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if the property is not supportedpublic abstract java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if the property is not supportedpublic abstract boolean isPropertySupported(java.lang.String name)
public abstract void setEventAllocator(javax.xml.stream.util.XMLEventAllocator allocator)
public abstract javax.xml.stream.util.XMLEventAllocator getEventAllocator()