IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

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

Transform elements in the message as it passes through a JavaCompute node in the message flow.

Before you start:

The incoming message and message assembly are read-only. Therefore, to modify a message, you must make a copy of it first. For more information, see Copying and modifying a message by using a JavaCompute node.

The Java™ API reference information provides details about each of the methods used in the following sections:

Setting information about an element

Use these methods to set information about the referenced element:

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

Use a JavaCompute node to copy or detach an element from a message tree by 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

ac30320_.htm | Last updated Friday, 21 July 2017