この関数を使用して、指定した構文エレメントの namespace 属性を設定します。
定義されている場所 | タイプ | メンバー |
---|---|---|
CPI_VFT | オプション | iFpSetElementValue |
void cpiSetElementNamespace( int* returnCode, CciElement* targetElement, const CciChar* nameSpace);
なし。
/* Convert the attribute value into broker form */
data = CciNString((char *)startMarker, markedSize, pc->iCcsid);
/* Create a new name-value element for the attribute */
newElement = cpiCreateElement(&rc, parser);
cpiSetElementType(&rc, newElement, CCI_ELEMENT_TYPE_NAME_VALUE);
cpiSetElementName(&rc, newElement, data);
cpiSetElementNamespace(&rc, newElement, data);
if (pc->trace) {
const char * mbData = mbString(data, pc->iCcsid);
fprintf(pc->tracefile, "PLUGIN: Created new NAMESPACEVALUE element;
object=0x%x type=0x%x name=",
newElement, CCI_ELEMENT_TYPE_NAME_VALUE);
fprintf(pc->tracefile, "%s¥n", mbData);
fflush(pc->tracefile);
free((void *)mbData);
}
/* Free the memory created in CciNString() */
free((void *)data);
/* Add the element */
cpiAddAsLastChild(&rc, element, newElement);