Interface OMNode

    • Method Detail

      • getNextOMSibling

        OMNode getNextOMSibling()
                         throws OMException
        Returns the next sibling in document order.
        Returns:
        Returns the next sibling in document order.
        Throws:
        OMException
      • detach

        OMNode detach()
               throws OMException
        Removes a node (and all of its children) from its containing parent.

        Removes a node from its parent. Please note that this will not handle the namespaces. For example, if there you have used a namespace within the detaching node and which is defined outside the detaching node, user has to handle it manually.

        Returns:
        The detached node. This is always the instance on which this method is invoked.
        Throws:
        OMException
      • discard

        void discard()
              throws OMException
        Discards a node.

        Discard goes to the parser level and if the element is not completely built, then it will be completely skipped at the parser level.

        Throws:
        OMException
      • insertSiblingAfter

        void insertSiblingAfter​(OMNode sibling)
                         throws OMException
        Inserts a new sibling after the current node. The current node must have a parent for this operation to succeed. If the node to be inserted has a parent, then it will first be detached.
        Parameters:
        sibling - The node that will be added after the current node.
        Throws:
        OMException - if the current node has no parent
      • insertSiblingBefore

        void insertSiblingBefore​(OMNode sibling)
                          throws OMException
        Inserts a sibling just before the current node. The current node must have a parent for this operation to succeed. If the node to be inserted has a parent, then it will first be detached.
        Parameters:
        sibling - The node that will be added before the current node.
        Throws:
        OMException - if the current node has no parent
      • getPreviousOMSibling

        OMNode getPreviousOMSibling()
        Gets the previous sibling.
        Returns:
        Returns node.
      • buildWithAttachments

        void buildWithAttachments()
        Builds itself with the OMText binary content. AXIOM supports two levels of deffered building. First is deffered building of AXIOM using StAX. Second level is the deffered building of attachments. AXIOM reads in the attachements from the stream only when user asks by calling getDataHandler(). build() method builds the OM without the attachments. buildAll() builds the OM together with attachement data. This becomes handy when user wants to free the input stream.