This function retrieves the value of the namespace attribute for the specified syntax element.
Defined In | Type | Member |
---|---|---|
CPI_VFT | Optional | iFpElementValue |
CciSize cpiElementNamespace(
int* returnCode,
CciElement* targetElement,
const CciChar* value,
CciSize length);
If successful, the number of CciChars copied into the buffer is returned.
If the buffer is not large enough to contain the attribute value, returnCode is set to CCI_BUFFER_TOO_SMALL, and the number of bytes CciChars required is returned.
elementNamespace=(CciChar*)malloc(sizeof(CciChar) * elementNamespaceLength);
elementNamespaceLength = cpiElementNamespace(&rc;,
element,
elementNamespace,
elementNamespaceLength);
if (rc==CCI_BUFFER_TOO_SMALL){
free(elementNamespace);
elementNamespace=(CciChar*)malloc(sizeof(CciChar) * elementNamespaceLength);
elementNamespaceLength = cpiElementNamespace(&rc;,
element,
elementNamespace,
elementNamespaceLength);
}
checkRC(rc);