Package net.sf.saxon.event

## Class PushToReceiver

- java.lang.Object
- - net.sf.saxon.event.PushToReceiver

- All Implemented Interfaces:
    `Push`

      public class PushToReceiver
      extends java.lang.Object
      implements Push

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface net.sf.saxon.s9api.Push

      `Push.Container, Push.Document, Push.Element`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PushToReceiver​(Receiver out)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Push.Document` | `document​(boolean wellFormed)` | Start an XML document.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PushToReceiver

          public PushToReceiver​(Receiver out)

  - ### Method Detail

    - #### document

          public Push.Document document​(boolean wellFormed)
                                 throws SaxonApiException

      Description copied from interface: `Push`
      Start an XML document.
      Specified by:
        `document` in interface `Push`
      Parameters:
        `wellFormed` - Set to true if the document is required to be well-formed; set to false if there is no such requirement. A well-formed document must have as its children exactly one element node plus optionally, any number of comment and processing instruction nodes (no text nodes are allowed); any attempt to construct a node sequence that does not follow these rules will result in an exception. If the document is not required to be well-formed, the children of the document node may comprise any sequence of element, text, comment, and processing instruction nodes.
      Returns:
        a Doc object which may be used to add content to the document, or to close the document when it has been fully written.
      Throws:
        `SaxonApiException` - if the specified constraints are violated, or if the implementation detects any problems