Package com.bea.xml.stream
Class MXParserFactory
java.lang.Object
javax.xml.stream.XMLInputFactory
com.bea.xml.stream.MXParserFactory
-
Field Summary
Fields inherited from class javax.xml.stream.XMLInputFactory
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFilteredReader
(XMLEventReader reader, EventFilter filter) Create a filtered event reader that wraps the filter around the event readercreateFilteredReader
(XMLStreamReader reader, StreamFilter filter) Create a filtered reader that wraps the filter around the readercreateXMLEventReader
(InputStream stream) Create a new XMLEventReader from an input streamcreateXMLEventReader
(InputStream stream, String encoding) Create a new XMLEventReader from an input streamcreateXMLEventReader
(Reader reader) Create a new XMLEventReader from a readercreateXMLEventReader
(String systemId, InputStream stream) Create a new XMLEventReader from a java.io.InputStreamcreateXMLEventReader
(String systemId, Reader reader) Create a new XMLEventReader from a readercreateXMLEventReader
(XMLStreamReader reader) Create a new XMLEventReader from an XMLStreamReadercreateXMLEventReader
(Source source) Create a new XMLEventReader from a JAXP sourcecreateXMLStreamReader
(InputStream stream) Create a new XMLStreamReader from a java.io.streamcreateXMLStreamReader
(InputStream stream, String encoding) Create a new XMLStreamReader from a java.io.streamCreate a new XMLStreamReader from a readercreateXMLStreamReader
(String systemId, InputStream stream) Create a new XMLStreamReader from a java.io.InputStreamcreateXMLStreamReader
(String systemId, Reader reader) Create a new XMLStreamReader from a java.io.InputStreamcreateXMLStreamReader
(Source source) Create a new XMLStreamReader from a JAXP source.Gets the allocator used by streams created with this factorygetProperty
(String name) Get the value of a feature/property from the underlying implementationThe reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.boolean
Indicates whether or not the factory is configured to produced streams that coalesce adjacent text nodes.boolean
isPropertySupported
(String name) Query the set of properties that this factory supports.static XMLInputFactory
void
setCoalescing
(boolean coalescing) Specifies that the stream produced by this code will append all adjacent text nodes.void
setEventAllocator
(XMLEventAllocator allocator) Set a user defined event allocator for eventsvoid
setProperty
(String name, Object value) Allows the user to set specific feature/property on the underlying implementation.void
setXMLReporter
(XMLReporter reporter) The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.void
setXMLResolver
(XMLResolver resolver) The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.Methods inherited from class javax.xml.stream.XMLInputFactory
newInstance
-
Constructor Details
-
MXParserFactory
public MXParserFactory()
-
-
Method Details
-
newInstance
-
createXMLStreamReader
Description copied from class:javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a JAXP source. This method is optional.- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Parameters:
source
- the source to read from- Throws:
XMLStreamException
-
createXMLStreamReader
Create a new XMLStreamReader from a java.io.stream- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Parameters:
stream
- the InputStream to read from- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(InputStream stream, String encoding) throws XMLStreamException Create a new XMLStreamReader from a java.io.stream- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Parameters:
stream
- the InputStream to read fromencoding
- the character encoding of the stream- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, InputStream stream) throws XMLStreamException Description copied from class:javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a java.io.InputStream- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Parameters:
systemId
- the system ID of the streamstream
- the InputStream to read from- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, Reader reader) throws XMLStreamException Description copied from class:javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a java.io.InputStream- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Parameters:
systemId
- the system ID of the streamreader
- the InputStream to read from- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, Reader reader) throws XMLStreamException Description copied from class:javax.xml.stream.XMLInputFactory
Create a new XMLEventReader from a reader- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
systemId
- the system ID of the inputreader
- the XML data to read from- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, InputStream stream) throws XMLStreamException Description copied from class:javax.xml.stream.XMLInputFactory
Create a new XMLEventReader from a java.io.InputStream- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
systemId
- the system ID of the streamstream
- the InputStream to read from- Throws:
XMLStreamException
-
createXMLEventReader
Create a new XMLEventReader from a reader- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
reader
- the XML data to read from- Throws:
XMLStreamException
-
createXMLEventReader
Create a new XMLEventReader from an XMLStreamReader- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
reader
- the XMLEventReader to read from- Returns:
- a new XMLEventReader
- Throws:
XMLStreamException
-
createXMLEventReader
Create a new XMLEventReader from a JAXP source- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
source
- the source to read from- Throws:
XMLStreamException
-
createXMLEventReader
Create a new XMLEventReader from an input stream- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
stream
- the InputStream to read from- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(InputStream stream, String encoding) throws XMLStreamException Create a new XMLEventReader from an input stream- Specified by:
createXMLEventReader
in classXMLInputFactory
- Parameters:
stream
- the InputStream to read fromencoding
- the character encoding of the stream- Throws:
XMLStreamException
-
getXMLResolver
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.- Specified by:
getXMLResolver
in classXMLInputFactory
-
setXMLResolver
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.- Specified by:
setXMLResolver
in classXMLInputFactory
- Parameters:
resolver
- the resolver to use to resolve references
-
createFilteredReader
public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException Create a filtered reader that wraps the filter around the reader- Specified by:
createFilteredReader
in classXMLInputFactory
- Parameters:
reader
- the reader to filterfilter
- the filter to apply to the reader- Throws:
XMLStreamException
-
createFilteredReader
public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException Create a filtered event reader that wraps the filter around the event reader- Specified by:
createFilteredReader
in classXMLInputFactory
- Parameters:
reader
- the event reader to wrapfilter
- the filter to apply to the event reader- Throws:
XMLStreamException
-
getXMLReporter
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.- Specified by:
getXMLReporter
in classXMLInputFactory
-
setXMLReporter
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.- Specified by:
setXMLReporter
in classXMLInputFactory
- Parameters:
reporter
- the resolver to use to report non fatal errors
-
setEventAllocator
Set a user defined event allocator for events- Specified by:
setEventAllocator
in classXMLInputFactory
- Parameters:
allocator
- the user defined allocator
-
getEventAllocator
Gets the allocator used by streams created with this factory- Specified by:
getEventAllocator
in classXMLInputFactory
-
setCoalescing
public void setCoalescing(boolean coalescing) Specifies that the stream produced by this code will append all adjacent text nodes. -
isCoalescing
public boolean isCoalescing()Indicates whether or not the factory is configured to produced streams that coalesce adjacent text nodes. -
setProperty
Description copied from class:javax.xml.stream.XMLInputFactory
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.- Specified by:
setProperty
in classXMLInputFactory
- Parameters:
name
- The name of the property (may not be null)value
- The value of the property- Throws:
IllegalArgumentException
- if the property is not supported
-
getProperty
Description copied from class:javax.xml.stream.XMLInputFactory
Get the value of a feature/property from the underlying implementation- Specified by:
getProperty
in classXMLInputFactory
- Parameters:
name
- The name of the property (may not be null)- Returns:
- The value of the property
- Throws:
IllegalArgumentException
- if the property is not supported
-
createXMLStreamReader
Description copied from class:javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a reader- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Parameters:
in
- the XML data to read from- Throws:
XMLStreamException
-
isPropertySupported
Description copied from class:javax.xml.stream.XMLInputFactory
Query the set of properties that this factory supports.- Specified by:
isPropertySupported
in classXMLInputFactory
- Parameters:
name
- The name of the property (may not be null)- Returns:
- true if the property is supported and false otherwise
-