javax.xml.stream
Class 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

XMLInputFactory

newInstance

Create a new instance of the factory.
This static method creates a new factory instance.
This method uses the following ordered lookup procedure to determine
the XMLInputFactory implementation class to load:
Use the javax.xml.stream.XMLInputFactory system property.
Use the properties file "lib/stax.properties" in the JRE directory.
This configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the system property defined above.
Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
The Services API will look for a classname in the file META-INF/services/javax.xml.stream.XMLInputFactory
in jars available to the runtime.
Platform default XMLInputFactory instance.
Once an application has obtained a reference to a XMLInputFactory
it can use the factory to configure and obtain stream instances.

setProperty

Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
is not required to support every setting of every property in the specification and may use IllegalArgumentException
to signal that an unsupported property may not be set with the specified value.