|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.stream.XMLInputFactory
Defines an abstract implementation of a factory for getting streams. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
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
Field Summary | |
static String |
IS_COALESCING
The property that requires the parser to coalesce adjacent character data sections |
static 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 String |
IS_REPLACING_ENTITY_REFERENCES
Requires the parser to replace internal entity references with their replacement text and report them as characters |
static String |
IS_SUPPORTING_EXTERNAL_ENTITIES
The property that requires the parser to resolve external parsed entities |
static String |
IS_VALIDATING
The property used to turn on/off implementation specific validation |
static String |
RESOLVER
|
static String |
SUPPORT_DTD
The property that requires the parser to support DTDs |
Constructor Summary | |
protected |
XMLInputFactory()
|
Method Summary | |
abstract XMLStreamReader |
createXMLStreamReader(InputStream stream)
Create a new XMLStreamReader from a java.io.InputStream |
abstract XMLStreamReader |
createXMLStreamReader(InputStream stream,
String encoding)
Create a new XMLStreamReader from a java.io.InputStream |
abstract XMLStreamReader |
createXMLStreamReader(Reader reader)
Create a new XMLStreamReader from a reader |
abstract Object |
getProperty(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(String name)
Query the set of properties that this factory supports. |
static XMLInputFactory |
newInstance()
Create a new instance of the factory. |
abstract void |
setProperty(String name,
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String IS_NAMESPACE_AWARE
true
setting must be supported
public static final String IS_VALIDATING
public static final String IS_COALESCING
public static final String IS_REPLACING_ENTITY_REFERENCES
public static final String IS_SUPPORTING_EXTERNAL_ENTITIES
public static final String SUPPORT_DTD
public static final String RESOLVER
Constructor Detail |
protected XMLInputFactory()
Method Detail |
public static XMLInputFactory newInstance() throws FactoryConfigurationError
FactoryConfigurationError
- if an instance of this factory cannot be
loadedpublic abstract XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
reader
- the XML data to read from, may not be null
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(InputStream stream) throws XMLStreamException
stream
- the InputStream to read from
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(InputStream stream, String encoding) throws XMLStreamException
stream
- the InputStream to read fromencoding
- the character encoding of the stream
XMLStreamException
public abstract XMLResolver getXMLResolver()
public abstract void setXMLResolver(XMLResolver resolver)
resolver
- the resolver to use to resolve referencespublic abstract void setProperty(String name, Object value) throws IllegalArgumentException
name
- The name of the property (may not be null
)value
- The value of the property
IllegalArgumentException
- if the property is not
supportedpublic abstract Object getProperty(String name) throws IllegalArgumentException
name
- The name of the property (may not be null
)
IllegalArgumentException
- if the property is not supportedpublic abstract boolean isPropertySupported(String name)
name
- The name of the property (may not be null
)
true
if the property is supported and
false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |