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


cniCopyElementTree

Use this function to copy a part of the element tree from the source element to the target element. Only the child elements of the source element are copied. All existing child elements of the target element are deleted, and are replaced by the child elements of the source element.

If the target element has not been fully parsed, or represents an unparsed bit stream, the cniCopyElementTree function results in a parse of the target element before its child elements are detached. The function therefore ensures consistency in message-tree formatting so that all references to detached fields by cciElements remain valid. Therefore, if a parsing exception occurs during the execution of the cniCopyElementTree function the cause might be a problem with either the target element or the source element.

Syntax

void cniCopyElementTree(
  int*         returnCode,
  CciElement*  sourceElement,
  CciElement*  targetElement);

Parameters

returnCode
The return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_MESSAGE_OBJECT
sourceElement
The address of the source syntax element object (input).
targetElement
The address of the target syntax element object (input).

Return values

None. If an error occurs, the returnCode parameter indicates the reason for the error.

Example

  cniCopyElementTree(&rc, inRootElement, outRootElement);

as07790_.htm | Last updated 2019-07-13 08:13:06