IBM Integration Bus, Version 10.0.0.9 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


cpiParsePreviousSibling

This function parses the previous (left) sibling of a specified syntax element. It is called by the integration node when the previous (left) sibling element of the current syntax element is required.

Defined In Type Member
CPI_VFT Mandatory iFpParsePreviousSibling

Syntax

void cpiParsePreviousSibling(
  CciParser*   parser,
  CciContext*  context,
  CciElement*  currentElement);

Parameters

parser
The address of the parser object (input).
context
The address of the context owned by the parser object (input).
currentElement
The address of the current syntax element (input).

Return values

None.

Sample

void cpiParsePreviousSibling(
  CciParser*  parser,
  CciContext* context,
  CciElement* element
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                rc;

  while ((!cpiElementCompletePrevious(&rc, cpiParent(&rc, element))) &&
         (!cpiPreviousSibling(&rc, element))       &&
         (pc->iCurrentElement))
  {
    pc->iCurrentElement = parsePreviousItem(parser, context, pc->iCurrentElement);
  }

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: <- cpiParsePreviousSibling()\n");
    fflush(pc->tracefile);
  }

  return;
}

The code sample is similar to that used for cpiParseNextSibling. Use cpiParsePreviousSibling as shown in the example when you are parsing the bit stream right to left.


as08070_.htm | Last updated 2017-07-17 12:45:51