Interface XMLSerializerFactory


  • @Role
    public interface XMLSerializerFactory
    Create XML serializers as listeners.
    Since:
    5.2M1
    Version:
    $Id: dc4c1aa0ecc2176de5fcee71a6b695553da15fb3 $
    • Method Detail

      • createSerializer

        <T> T createSerializer​(Class<T> filterInterface,
                               Result xmlResult,
                               XMLConfiguration configuration)
                        throws XMLStreamException,
                               FactoryConfigurationError
        Type Parameters:
        T - the type of the event listener
        Parameters:
        filterInterface - the interface of the filter that will receive the events
        xmlResult - the StAX event writer
        configuration - the configuration of the serializer
        Returns:
        the listener to send events to
        Throws:
        FactoryConfigurationError - if no instance of XMLOutputFactory can be found
        XMLStreamException - if the passed result is not supported
      • createSerializer

        <T> T createSerializer​(Class<?>[] filterInterfaces,
                               Result xmlResult,
                               XMLConfiguration configuration)
                        throws XMLStreamException,
                               FactoryConfigurationError
        Type Parameters:
        T - the type of the event listener
        Parameters:
        filterInterfaces - the interfaces of the filter that will receive the events
        xmlResult - the StAX event writer
        configuration - the configuration of the serializer
        Returns:
        the listener to send events to
        Throws:
        FactoryConfigurationError - if no instance of XMLOutputFactory can be found
        XMLStreamException - if the passed result is not supported
        Since:
        5.3M1