Class MXParserFactory
java.lang.Object
javax.xml.stream.XMLInputFactory
com.bea.xml.stream.MXParserFactory
-
Field Summary
Fields inherited from class 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.booleanIndicates whether or not the factory is configured to produced streams that coalesce adjacent text nodes.booleanisPropertySupported(String name) Query the set of properties that this factory supports.static XMLInputFactoryvoidsetCoalescing(boolean coalescing) Specifies that the stream produced by this code will append all adjacent text nodes.voidsetEventAllocator(XMLEventAllocator allocator) Set a user defined event allocator for eventsvoidsetProperty(String name, Object value) Allows the user to set specific feature/property on the underlying implementation.voidsetXMLReporter(XMLReporter reporter) The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.voidsetXMLResolver(XMLResolver resolver) The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.Methods inherited from class XMLInputFactory
newInstance
-
Constructor Details
-
MXParserFactory
public MXParserFactory()
-
-
Method Details
-
newInstance
-
createXMLStreamReader
Description copied from class:javax.xml.stream.XMLInputFactoryCreate a new XMLStreamReader from a JAXP source. This method is optional.- Specified by:
createXMLStreamReaderin classXMLInputFactory- Parameters:
source- the source to read from- Throws:
XMLStreamException
-
createXMLStreamReader
Create a new XMLStreamReader from a java.io.stream- Specified by:
createXMLStreamReaderin 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:
createXMLStreamReaderin 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.XMLInputFactoryCreate a new XMLStreamReader from a java.io.InputStream- Specified by:
createXMLStreamReaderin 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.XMLInputFactoryCreate a new XMLStreamReader from a java.io.InputStream- Specified by:
createXMLStreamReaderin 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.XMLInputFactoryCreate a new XMLEventReader from a reader- Specified by:
createXMLEventReaderin 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.XMLInputFactoryCreate a new XMLEventReader from a java.io.InputStream- Specified by:
createXMLEventReaderin 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:
createXMLEventReaderin classXMLInputFactory- Parameters:
reader- the XML data to read from- Throws:
XMLStreamException
-
createXMLEventReader
Create a new XMLEventReader from an XMLStreamReader- Specified by:
createXMLEventReaderin 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:
createXMLEventReaderin classXMLInputFactory- Parameters:
source- the source to read from- Throws:
XMLStreamException
-
createXMLEventReader
Create a new XMLEventReader from an input stream- Specified by:
createXMLEventReaderin 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:
createXMLEventReaderin 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:
getXMLResolverin classXMLInputFactory
-
setXMLResolver
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.- Specified by:
setXMLResolverin 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:
createFilteredReaderin 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:
createFilteredReaderin 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:
getXMLReporterin classXMLInputFactory
-
setXMLReporter
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.- Specified by:
setXMLReporterin classXMLInputFactory- Parameters:
reporter- the resolver to use to report non fatal errors
-
setEventAllocator
Set a user defined event allocator for events- Specified by:
setEventAllocatorin classXMLInputFactory- Parameters:
allocator- the user defined allocator
-
getEventAllocator
Gets the allocator used by streams created with this factory- Specified by:
getEventAllocatorin 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.XMLInputFactoryAllows 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:
setPropertyin 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.XMLInputFactoryGet the value of a feature/property from the underlying implementation- Specified by:
getPropertyin 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.XMLInputFactoryCreate a new XMLStreamReader from a reader- Specified by:
createXMLStreamReaderin classXMLInputFactory- Parameters:
in- the XML data to read from- Throws:
XMLStreamException
-
isPropertySupported
Description copied from class:javax.xml.stream.XMLInputFactoryQuery the set of properties that this factory supports.- Specified by:
isPropertySupportedin classXMLInputFactory- Parameters:
name- The name of the property (may not be null)- Returns:
- true if the property is supported and false otherwise
-