org.apache.axiom.om

## Interface OMDocument

- All Superinterfaces:
    OMContainer, OMInformationItem, OMSerializable
  All Known Subinterfaces:
    SOAPMessage

      public interface OMDocument
      extends OMContainer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `XML_10` Field XML_10 XML Version 1.0
    `static String` | `XML_11` Field XML_11 XML Version 1.1

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCharsetEncoding()` Get the character set encoding scheme.
    `OMElement` | `getOMDocumentElement()` Get the document element.
    `String` | `getXMLEncoding()` Get the charset encoding of this document as specified in the XML declaration.
    `String` | `getXMLVersion()` Returns the XML version.
    `String` | `isStandalone()` XML standalone value.
    `void` | `setCharsetEncoding(String charsetEncoding)` Sets the character set encoding scheme to be used.
    `void` | `setOMDocumentElement(OMElement documentElement)` Set the document element of the XML document.
    `void` | `setStandalone(String isStandalone)`
    `void` | `setXMLEncoding(String encoding)` Set the charset encoding for the XML declaration of this document.
    `void` | `setXMLVersion(String version)` Sets the XML version.

    - ### Methods inherited from interface org.apache.axiom.om.OMContainer

      `addChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChildWithName, getFirstOMChild, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeChildren, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume`

    - ### Methods inherited from interface org.apache.axiom.om.OMSerializable

      `build, close, isComplete, serialize, serialize, serializeAndConsume`

    - ### Methods inherited from interface org.apache.axiom.om.OMInformationItem

      `clone, getOMFactory`

- - ### Field Detail

    - #### XML_10

          static final String XML_10

      Field XML_10 XML Version 1.0
      See Also:
        Constant Field Values

    - #### XML_11

          static final String XML_11

      Field XML_11 XML Version 1.1
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getOMDocumentElement

          OMElement getOMDocumentElement()

      Get the document element.
      Returns:
        the document element, or `null` if the document doesn't have any children of type `OMElement`

    - #### setOMDocumentElement

          void setOMDocumentElement(OMElement documentElement)

      Set the document element of the XML document. If the document has no document element, then the new document element will be appended as the last child. If the document already has a document element, then it will be replaced by the new one and the position of the other children relative to the document element is preserved.

      Some models (such as SOAP) may throw an exception if the specified element is not allowed as a root element.

      Parameters:
        `documentElement` - the new document element; must not be `null`
      Throws:
        `IllegalArgumentException` - if the parameter is `null`

    - #### getCharsetEncoding

          String getCharsetEncoding()

      Get the character set encoding scheme. This is the encoding that was used used for this document at the time of the parsing. This is `null` when it is not known, such as when the document was created in memory or from a character stream.
      Returns:
        the charset encoding for this document, or `null` if the encoding is not known

    - #### setCharsetEncoding

          void setCharsetEncoding(String charsetEncoding)

      Sets the character set encoding scheme to be used.
      Parameters:
        `charsetEncoding` -

    - #### getXMLVersion

          String getXMLVersion()

      Returns the XML version.
      Returns:
        Returns String.

    - #### setXMLVersion

          void setXMLVersion(String version)

      Sets the XML version.
      Parameters:
        `version` -
      See Also:
        `XML_10`, `XML_11`

    - #### getXMLEncoding

          String getXMLEncoding()

      Get the charset encoding of this document as specified in the XML declaration.
      Returns:
        the charset encoding specified in the XML declaration, or `null` if the document didn't have an XML declaration or if the `encoding` attribute was not specified in the XML declaration

    - #### setXMLEncoding

          void setXMLEncoding(String encoding)

      Set the charset encoding for the XML declaration of this document.
      Parameters:
        `encoding` - the value of the `encoding` attribute of the XML declaration

    - #### isStandalone

          String isStandalone()

      XML standalone value. This will be yes, no or null (if not available)
      Returns:
        Returns boolean.

    - #### setStandalone

          void setStandalone(String isStandalone)

Copyright © The Apache Software Foundation. All Rights Reserved.