Class XmlStreamFormat

  • All Implemented Interfaces:
    StreamFormat

    public class XmlStreamFormat
    extends StreamFormatSupport
    A StreamFormatSupport implementation for the XML stream format.

    This implementation requires a reference to the stream layout (i.e. the root Selector in the parser tree). The layout is not modified in any way allowing this class to be thread safe.

    Since:
    2.0
    • Constructor Detail

      • XmlStreamFormat

        public XmlStreamFormat()
    • Method Detail

      • createMarshallingContext

        public MarshallingContext createMarshallingContext​(boolean streaming)
        Description copied from interface: StreamFormat
        Creates a new marshalling context.
        Parameters:
        streaming - true if marshalling to a stream
        Returns:
        the new MarshallingContext
      • setLayout

        public void setLayout​(Selector layout)
        Sets the stream layout.
        Parameters:
        layout - the root Selector node in the parser tree
      • createBaseDocument

        protected org.w3c.dom.Document createBaseDocument​(Selector layout)
        Creates a DOM made up of any group nodes in the parser tree.
        Returns:
        the new Document made up of group nodes
      • setGroupDepth

        public void setGroupDepth​(int groupDepth)
        Parameters:
        groupDepth -