cniCreateElementBefore

Creates a new syntax element and inserts it before the specified syntax element. The new element becomes the previous sibling of the specified element, and shares the same parent element.

Syntax

CciElement* cniCreateElementBefore(
  int*         returnCode,
  CciElement*  targetElement);

Parameters

returnCode
The return code from the function (output).
targetElement
The address of the target element object (input).

Return values

If successful, the address of the new element object is returned. Otherwise, a value of zero (CCI_NULL_ADDR) is returned, and the returnCode parameter indicates the reason for the error.

Related concepts
User-defined message processing nodes
User-defined output nodes

Related tasks
Creating a message processing node in C

Related reference
C language node utility functions
cniCreateElementAfter
cniCreateElementAfterUsingParser
cniCreateElementBeforeUsingParser