WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
cpiElementValueValue
This function gets the value object from the specified syntax element. This value object is opaque in that it cannot be interrogated. It can be used to set or derive the value of one element from another, without knowing its type, by using the cpiSetElementValueValue function.
This function can be used by parsers that override behavior by calling the implementation functions cpiElementValue and cpiSetElementValue.
Syntax
const CciElementValue* cpiElementValueValue(
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
- targetElement
- Specifies the address of the target syntax element object (input).
Return values
The address of the CciElementValue object stored in the specified target syntax element 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 parser file BipSampPluginParser.c:
const CciElementValue* cpiElementValue(
CciParser* parser,
CciElement* element
){
CciElement* firstChild;
const CciElementValue* value;
int rc;
if ((cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_VALUE) ||
(cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME_VALUE)) {
value = cpiElementValueValue(&rc, element);
}
else if (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME) {
firstChild = cniFirstChild(&rc, element);
value = cpiElementValueValue(&rc, firstChild);
}
else {
}
return(value);
}