WebSphere Message Brokers
File: as08330_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:38:06

cpiFirstChild

Purpose

Returns the address of the syntax element object that is the first child of the specified target element.

Syntax

CciElement* cpiFirstChild(
  int*               returnCode,
  const CciElement*  targetElement);

Parameters

returnCode
Receives the return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
targetElement
Specifies the address of the target syntax element object (input).

Return values

The address of the requested syntax element object is returned, unless there is no child in which case zero is returned. If an error occurs, zero (CCI_NULL_ADDR) is returned and returnCode indicates the reason for the error.

Sample

This example is taken from the sample node file BipSampPluginParser.c (lines 494 to 496):

while ((!cpiElementCompleteNext(&rc, element))     &&
           (!cpiFirstChild(&rc, element)) &&
           (pc->iCurrentElement))
Related concepts
User-defined parsers
User-defined extensions overview
Related tasks
Creating a parser in C
Related reference
cpiLastChild
C parser 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:38:06

as08330_ This topic's URL is: