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.
void cniCopyElementTree( int* returnCode, CciElement* sourceElement, CciElement* targetElement);
None. If an error occurs, the returnCode parameter indicates the reason for the error.