This function gets the type of the target syntax element. The syntax element type must be set previously by using cniSetElementType or cpiSetElementType.
CciElementType cpiElementType(
int* returnCode,
CciElement* targetElement);
The value of the element type is returned. If an error occurs, returnCode indicates the reason for the error.
This example is taken from the sample parser file BipSampPluginParser.c:
if ((!cpiElementCompleteNext(&rc, element)) &&
(cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME)) {
while ((!cpiElementCompleteNext(&rc, element)) &&
(!cpiFirstChild(&rc, element)) &&
(pc->iCurrentElement))
{
pc->iCurrentElement = parseNextItem(parser, context, pc->iCurrentElement);
}