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) createXMLEventReader
(String systemId, Reader reader) createXMLEventReader
(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.streamcreateXMLStreamReader
(String systemId, InputStream stream) createXMLStreamReader
(String systemId, Reader reader) createXMLStreamReader
(Source source) Gets the allocator used by streams created with this factorygetProperty
(String name) The 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) 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) 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
newDefaultFactory, newFactory, newFactory, newInstance
-
Constructor Details
-
MXParserFactory
public MXParserFactory()
-
-
Method Details
-
newInstance
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- 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 - Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, Reader reader) throws XMLStreamException - Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, Reader reader) throws XMLStreamException - Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, InputStream stream) throws XMLStreamException - Specified by:
createXMLEventReader
in classXMLInputFactory
- 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- 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
- Specified by:
setProperty
in classXMLInputFactory
- Throws:
IllegalArgumentException
-
getProperty
- Specified by:
getProperty
in classXMLInputFactory
- Throws:
IllegalArgumentException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
isPropertySupported
- Specified by:
isPropertySupported
in classXMLInputFactory
-