4.2 How to use StAX properties
The StAX standards allow you to specify properties in XMLInputFactory and XMLOutputFactory. You can specify the following properties:
-
javax.xml.stream.isNamespaceAware
-
javax.xml.stream.isCoalescing
-
javax.xml.stream.isReplacingEntityReferences
-
javax.xml.stream.isSupportingExternalEntities
-
javax.xml.stream.reporter
-
javax.xml.stream.resolver
-
javax.xml.stream.allocator
-
javax.xml.stream.isRepairingNamespaces
For meanings of the respective properties, see the following subsections in Streaming API For XML Version 1.0 (JSR-173):
-
Chapter 4.5.1.1. Supported Properties of XMLInputFactory
-
Chapter 4.5.2.1 Supported Properties of XMLOutputFactory
-
Javadoc
- How to use StAX properties
-
To specify properties for XMLInputFactory, use the setProperty method of the javax.xml.stream.XMLInputFactory class, and to specify properties for XMLOutputFactory, use the setProperty method of the javax.xml.stream.XMLOutputFactory class.
The following points describe how to specify the respective properties:
-
To specify properties for XMLInputFactory
-
To specify properties for XMLOutputFactory
-