public abstract class XMLInputFactory
extends java.lang.Object
Configuration parameters | ||||
---|---|---|---|---|
Property Name | Behavior | Return type | Default Value | Required |
javax.xml.stream.isValidating | Turns on/off implementation specific DTD validation | Boolean | False | No |
javax.xml.stream.isNamespaceAware | Turns on/off namespace processing for XML 1.0 support | Boolean | True | True (required) / False (optional) |
javax.xml.stream.isCoalescing | Requires the processor to coalesce adjacent character data | Boolean | False | Yes |
javax.xml.stream.isReplacingEntityReferences | replace internal entity references with their replacement text and report them as characters | Boolean | True | Yes |
javax.xml.stream.isSupportingExternalEntities | Resolve external parsed entities | Boolean | Unspecified | Yes |
javax.xml.stream.supportDTD | Use this property to request processors that do not support DTDs | Boolean | True | Yes |
javax.xml.stream.resolver | sets/gets the impl of the XMLResolver interface | javax.xml.stream.XMLResolver | Null | Yes |
XMLOutputFactory
,
XMLStreamReader
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IS_COALESCING
The property that requires the parser to coalesce adjacent character data
sections
|
static java.lang.String |
IS_NAMESPACE_AWARE
The property used to turn on/off namespace support,
this is to support XML 1.0 documents,
only the
true setting must be supported |
static java.lang.String |
IS_REPLACING_ENTITY_REFERENCES
Requires the parser to replace internal
entity references with their replacement
text and report them as characters
|
static java.lang.String |
IS_SUPPORTING_EXTERNAL_ENTITIES
The property that requires the parser to resolve external parsed entities
|
static java.lang.String |
IS_VALIDATING
The property used to turn on/off implementation specific validation
|
static java.lang.String |
RESOLVER |
static java.lang.String |
SUPPORT_DTD
The property that requires the parser to support DTDs
|
Modifier | Constructor and Description |
---|---|
protected |
XMLInputFactory() |
Modifier and Type | Method and Description |
---|---|
abstract XMLStreamReader |
createXMLStreamReader(java.io.InputStream stream)
Create a new XMLStreamReader from a java.io.InputStream
|
abstract XMLStreamReader |
createXMLStreamReader(java.io.InputStream stream,
java.lang.String encoding)
Create a new XMLStreamReader from a java.io.InputStream
|
abstract XMLStreamReader |
createXMLStreamReader(java.io.Reader reader)
Create a new XMLStreamReader from a reader
|
abstract java.lang.Object |
getProperty(java.lang.String name)
Get the value of a feature/property from the underlying implementation
|
abstract XMLResolver |
getXMLResolver()
The resolver that will be set on any XMLStreamReader created
by this factory instance.
|
abstract boolean |
isPropertySupported(java.lang.String name)
Query the set of properties that this factory supports.
|
static XMLInputFactory |
newInstance()
Create a new instance of the factory.
|
abstract void |
setProperty(java.lang.String name,
java.lang.Object value)
Allows the user to set specific feature/property on the underlying
implementation.
|
abstract void |
setXMLResolver(XMLResolver resolver)
The resolver that will be set on any XMLStreamReader created
by this factory instance.
|
public static final java.lang.String IS_NAMESPACE_AWARE
true
setting must be supportedpublic 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 RESOLVER
public static XMLInputFactory newInstance() throws FactoryConfigurationError
FactoryConfigurationError
- if an instance of this factory cannot be
loadedpublic abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException
reader
- the XML data to read from, may not be nullXMLStreamException
public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException
stream
- the InputStream to read fromXMLStreamException
public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
stream
- the InputStream to read fromencoding
- the character encoding of the streamXMLStreamException
public abstract XMLResolver getXMLResolver()
public abstract void setXMLResolver(XMLResolver resolver)
resolver
- the resolver to use to resolve referencespublic abstract void setProperty(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
name
- The name of the property (may not be null
)value
- The value of the propertyjava.lang.IllegalArgumentException
- if the property is not
supportedpublic abstract java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException
name
- The name of the property (may not be null
)java.lang.IllegalArgumentException
- if the property is not supportedpublic abstract boolean isPropertySupported(java.lang.String name)
name
- The name of the property (may not be null
)true
if the property is supported and
false
otherwiseCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.