WebSphere Message Brokers
File: as08450_
Writer: Lorraine Waitt

Reference topic

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

cpiElementValue group

Purpose

Functions to get the value of the specified syntax element.

Syntax

CciSize cpiElementBitArrayValue(
  int*         returnCode,
  CciElement*  targetElement,
  const struct CciBitArray* value);
CciBool cpiElementBooleanValue(
  int*         returnCode,
  CciElement*  targetElement);
CciSize cpiElementByteArrayValue(
  int*         returnCode,
  CciElement*  targetElement,
  const struct CciByteArray* value);
CciSize cpiElementCharacterValue(
  int*            returnCode,
  CciElement*     targetElement,
  const CciChar*  value,
  CciSize         length);
struct CciDate cpiElementDateValue(
  int*         returnCode,
  CciElement*  targetElement);
CciSize cpiElementDecimalValue(
  int*            returnCode,
  CciElement*     targetElement,
  const CciChar*  value,
  CciSize         length);
struct CciTimestamp cpiElementGmtTimestampValue(
  int*         returnCode,
  CciElement*  targetElement);
struct CciTime cpiElementGmtTimeValue(
  int*         returnCode,
  CciElement*  targetElement);
CciInt cpiElementIntegerValue(
  int*         returnCode,
  CciElement*  targetElement);
CciReal cpiElementRealValue(
  int*         returnCode,
  CciElement*  targetElement);
struct CciTimestamp cpiElementTimestampValue(
  int*         returnCode,
  CciElement*  targetElement);
struct CciTime cpiElementTimeValue(
  int*         returnCode,
  CciElement*  targetElement);

Parameters

returnCode
Receives the return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
  • CCI_INV_DATA_POINTER
  • CCI_INV_DATA_BUFLEN
  • CCI_INV_BUFFER_TOO_SMALL
targetElement
Specifies the address of the target syntax element object (input).
value
The address of an output buffer into which the value of the syntax element is stored (input). Used on relevant function calls only.
length
The length of the output buffer, in characters, specified by the value parameter (input). Used on relevant function calls only.

Return values

The value of the element is returned.

In some cases, for example, cpiElementCharacterValue or cpiElementDecimalValue, if the buffer is not large enough to receive the data the data is not written into the buffer. The size of the required buffer is passed as the return value, and returnCode is set to CCI_BUFFER_TOO_SMALL.

If an error occurs, returnCode indicates the reason for the error.

Related concepts
User-defined parsers
User-defined extensions overview
Related tasks
Creating a parser in C
Related reference
cpiElementName
cpiElementType
cpiElementValueValue
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:12

as08450_ This topic's URL is: