com.bea.xml.stream
Class MXParserFactory

java.lang.Object
  extended byjavax.xml.stream.XMLInputFactory
      extended bycom.bea.xml.stream.MXParserFactory

public class MXParserFactory
extends javax.xml.stream.XMLInputFactory


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
MXParserFactory()
           
 
Method Summary
 javax.xml.stream.XMLEventReader createFilteredReader(javax.xml.stream.XMLEventReader reader, javax.xml.stream.EventFilter filter)
          Create a filtered event reader that wraps the filter around the event reader
 javax.xml.stream.XMLStreamReader createFilteredReader(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.StreamFilter filter)
          Create a filtered reader that wraps the filter around the reader
 javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream stream)
          Create a new XMLEventReader from a java.io.stream
 javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream stream, java.lang.String encoding)
          Create a new XMLEventReader from a java.io.stream
 javax.xml.stream.XMLEventReader createXMLEventReader(java.io.Reader reader)
          Create a new XMLEventReader from a reader
 javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.transform.Source source)
          Create a new XMLEventReader from a JAXP source
 javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.InputStream stream)
          Create a new XMLEventReader from a java.io.InputStream
 javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.Reader reader)
          Create a new XMLEventReader from a reader
 javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.stream.XMLStreamReader reader)
          Create a new XMLEventReader from an XMLStreamReader
 javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream stream)
          Create a new XMLStreamReader from a java.io.stream
 javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream stream, java.lang.String encoding)
          Create a new XMLStreamReader from a java.io.stream
 javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.Reader in)
          Create a new XMLStreamReader from a reader
 javax.xml.stream.XMLStreamReader createXMLStreamReader(javax.xml.transform.Source source)
          Create a new XMLStreamReader from a JAXP source.
 javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.InputStream stream)
          Create a new XMLStreamReader from a java.io.InputStream
 javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.Reader reader)
          Create a new XMLStreamReader from a java.io.InputStream
 javax.xml.stream.util.XMLEventAllocator getEventAllocator()
          Gets the allocator used by streams created with this factory
 java.lang.Object getProperty(java.lang.String name)
          Get the value of a feature/property from the underlying implementation
 javax.xml.stream.XMLReporter getXMLReporter()
          The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
 javax.xml.stream.XMLResolver getXMLResolver()
          The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
 boolean isCoalescing()
          Indicates whether or not the factory is configured to produced streams that coalesce adjacent text nodes.
 boolean isPropertySupported(java.lang.String name)
          Query the set of properties that this factory supports.
static javax.xml.stream.XMLInputFactory newInstance()
          Create a new instance of the factory.
 void setCoalescing(boolean coalescing)
          Specifies that the stream produced by this code will append all adjacent text nodes.
 void setEventAllocator(javax.xml.stream.util.XMLEventAllocator allocator)
          Set a user defined event allocator for events
 void setProperty(java.lang.String name, java.lang.Object value)
          Allows the user to set specific feature/property on the underlying implementation.
 void setXMLReporter(javax.xml.stream.XMLReporter reporter)
          The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
 void setXMLResolver(javax.xml.stream.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MXParserFactory

public MXParserFactory()
Method Detail

newInstance

public static javax.xml.stream.XMLInputFactory newInstance()
Description copied from class: javax.xml.stream.XMLInputFactory
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.


createXMLStreamReader

public javax.xml.stream.XMLStreamReader createXMLStreamReader(javax.xml.transform.Source source)
                                                       throws javax.xml.stream.XMLStreamException
Description copied from class: javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a JAXP source. This method is optional.

Parameters:
source - the source to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLStreamReader

public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream stream)
                                                       throws javax.xml.stream.XMLStreamException
Create a new XMLStreamReader from a java.io.stream

Parameters:
stream - the InputStream to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLStreamReader

public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream stream,
                                                              java.lang.String encoding)
                                                       throws javax.xml.stream.XMLStreamException
Create a new XMLStreamReader from a java.io.stream

Parameters:
stream - the InputStream to read from
encoding - the character encoding of the stream
Throws:
javax.xml.stream.XMLStreamException

createXMLStreamReader

public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String systemId,
                                                              java.io.InputStream stream)
                                                       throws javax.xml.stream.XMLStreamException
Description copied from class: javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a java.io.InputStream

Parameters:
systemId - the system ID of the stream
stream - the InputStream to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLStreamReader

public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String systemId,
                                                              java.io.Reader reader)
                                                       throws javax.xml.stream.XMLStreamException
Description copied from class: javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a java.io.InputStream

Parameters:
systemId - the system ID of the stream
reader - the InputStream to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String systemId,
                                                            java.io.Reader reader)
                                                     throws javax.xml.stream.XMLStreamException
Description copied from class: javax.xml.stream.XMLInputFactory
Create a new XMLEventReader from a reader

Parameters:
systemId - the system ID of the input
reader - the XML data to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String systemId,
                                                            java.io.InputStream stream)
                                                     throws javax.xml.stream.XMLStreamException
Description copied from class: javax.xml.stream.XMLInputFactory
Create a new XMLEventReader from a java.io.InputStream

Parameters:
systemId - the system ID of the stream
stream - the InputStream to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.Reader reader)
                                                     throws javax.xml.stream.XMLStreamException
Create a new XMLEventReader from a reader

Parameters:
reader - the XML data to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.stream.XMLStreamReader reader)
                                                     throws javax.xml.stream.XMLStreamException
Create a new XMLEventReader from an XMLStreamReader

Parameters:
reader - the XMLEventReader to read from
Returns:
a new XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.transform.Source source)
                                                     throws javax.xml.stream.XMLStreamException
Create a new XMLEventReader from a JAXP source

Parameters:
source - the source to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream stream)
                                                     throws javax.xml.stream.XMLStreamException
Create a new XMLEventReader from a java.io.stream

Parameters:
stream - the InputStream to read from
Throws:
javax.xml.stream.XMLStreamException

createXMLEventReader

public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream stream,
                                                            java.lang.String encoding)
                                                     throws javax.xml.stream.XMLStreamException
Create a new XMLEventReader from a java.io.stream

Parameters:
stream - the InputStream to read from
encoding - the character encoding of the stream
Throws:
javax.xml.stream.XMLStreamException

getXMLResolver

public javax.xml.stream.XMLResolver getXMLResolver()
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.


setXMLResolver

public void setXMLResolver(javax.xml.stream.XMLResolver resolver)
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

Parameters:
resolver - the resolver to use to resolve references

createFilteredReader

public javax.xml.stream.XMLStreamReader createFilteredReader(javax.xml.stream.XMLStreamReader reader,
                                                             javax.xml.stream.StreamFilter filter)
                                                      throws javax.xml.stream.XMLStreamException
Create a filtered reader that wraps the filter around the reader

Parameters:
reader - the reader to filter
filter - the filter to apply to the reader
Throws:
javax.xml.stream.XMLStreamException

createFilteredReader

public javax.xml.stream.XMLEventReader createFilteredReader(javax.xml.stream.XMLEventReader reader,
                                                            javax.xml.stream.EventFilter filter)
                                                     throws javax.xml.stream.XMLStreamException
Create a filtered event reader that wraps the filter around the event reader

Parameters:
reader - the event reader to wrap
filter - the filter to apply to the event reader
Throws:
javax.xml.stream.XMLStreamException

getXMLReporter

public javax.xml.stream.XMLReporter getXMLReporter()
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.


setXMLReporter

public void setXMLReporter(javax.xml.stream.XMLReporter reporter)
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

Parameters:
reporter - the resolver to use to report non fatal errors

setEventAllocator

public void setEventAllocator(javax.xml.stream.util.XMLEventAllocator allocator)
Set a user defined event allocator for events

Parameters:
allocator - the user defined allocator

getEventAllocator

public javax.xml.stream.util.XMLEventAllocator getEventAllocator()
Gets the allocator used by streams created with this factory


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

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws java.lang.IllegalArgumentException
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.

Parameters:
name - The name of the property (may not be null)
value - The value of the property
Throws:
java.lang.IllegalArgumentException - if the property is not supported

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws java.lang.IllegalArgumentException
Description copied from class: javax.xml.stream.XMLInputFactory
Get the value of a feature/property from the underlying implementation

Parameters:
name - The name of the property (may not be null)
Returns:
The value of the property
Throws:
java.lang.IllegalArgumentException - if the property is not supported

createXMLStreamReader

public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.Reader in)
                                                       throws javax.xml.stream.XMLStreamException
Description copied from class: javax.xml.stream.XMLInputFactory
Create a new XMLStreamReader from a reader

Parameters:
in - the XML data to read from
Throws:
javax.xml.stream.XMLStreamException

isPropertySupported

public boolean isPropertySupported(java.lang.String name)
Description copied from class: javax.xml.stream.XMLInputFactory
Query the set of properties that this factory supports.

Parameters:
name - The name of the property (may not be null)
Returns:
true if the property is supported and false otherwise