Use a
JavaCompute node
to copy or detach an element from a message tree using the following methods:
- detach()
- The element is detached from its parent and siblings, but any child elements
are left attached
- copy()
- A copy of the element and its attached children is created
Use one of four methods to attach an element or subtree
that you have copied on to another tree:
- addAsFirstChild(element)
- Adds an unattached element as the first child of element
- addAsLastChild(element)
- Adds an unattached element as the last child of element
- addBefore(element)
- Adds an unattached element as the previous sibling of element
- addAfter(element)
- Adds an unattached element as the next sibling of element