Interface XMLMapper

  • All Known Implementing Classes:
    XMLMapperImpl

    public interface XMLMapper
    An XML mapper. Allows the creation of extensible streaming XML parsers.
    • Method Detail

      • parseDocument

        void parseDocument​(java.lang.Object rootObject,
                           javax.xml.stream.XMLStreamReader reader)
                    throws javax.xml.stream.XMLStreamException
        Parse a document. The document must have a known, registered root element which can accept the given root object.
        Parameters:
        rootObject - the root object to send in
        reader - the reader from which the document should be read
        Throws:
        javax.xml.stream.XMLStreamException - if an error occurs
      • deparseDocument

        void deparseDocument​(XMLElementWriter<?> writer,
                             java.lang.Object rootObject,
                             javax.xml.stream.XMLStreamWriter streamWriter)
                      throws javax.xml.stream.XMLStreamException
        Format the element writer's output on to an XML stream writer.
        Parameters:
        writer - the element writer
        rootObject - the root object to send in
        streamWriter - the stream writer
        Throws:
        javax.xml.stream.XMLStreamException - if an exception occurs
      • deparseDocument

        @Deprecated
        void deparseDocument​(XMLContentWriter contentWriter,
                             javax.xml.stream.XMLStreamWriter streamWriter)
                      throws javax.xml.stream.XMLStreamException
        Deprecated.
        Format the content writer's output on to an XML stream writer.
        Parameters:
        contentWriter - the content writer
        streamWriter - the stream writer
        Throws:
        javax.xml.stream.XMLStreamException - if an exception occurs