Setting, copying, and moving message elements using a JavaCompute node

This topic contains the following information about transforming a message:

Setting information about an element using a JavaCompute node

Use these methods to set information about the referenced element. The Java user-defined node API provides further detail about the methods:
setName()
Sets the name of the element
setValue()
Sets the value of the element
setSpecificType()
Sets the parser-specific type of the element
setNamespace()
Sets the namespace URI of the element

Moving and copying elements using a JavaCompute node

You can 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
There are 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
Related concepts
Message flows overview
Related reference
JavaCompute node
Related information
Java user-defined node API