WebSphere Message Brokers
File: as07790_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:37:31

cniCopyElementTree

Copies 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, then 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 any 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);
Related reference
C node utility functions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:37:31

as07790_ This topic's URL is: