CciElement* cpiCreateAndInitializeElement( int* returnCode, CciParser* parser, CciElementType type, const CciChar* name, CciBool firstChildComplete, CciBool lastChildComplete);
함수가 정상적으로 실행되면, 새 요소 오브젝트의 주소가 리턴됩니다. 정상적으로 실행되지 않으면, 0 값(CCI_NULL_ADDR)이 리턴되고 returnCode는 오류의 이유를 표시합니다.
/* Advance to the end of the value */ while (pc->iCurrentCharacter != quoteChar) { advance( (PARSER_CONTEXT_ST *)context, parser ); } /* Get a pointer to the end of the tag */ endMarker = (char*)pc->iBuffer+(int)pc->iIndex; /* Compute the size of the tag */ markedSize = (size_t)endMarker-(int)startMarker; /* Convert the attribute value into broker form */ data = CciNString((char *)startMarker, markedSize, pc->iCcsid); /* Create a new name-value element for the attribute */ newElement = cpiCreateAndInitializeElement(&rc, parser, type, name); cpiSetElementType(&rc, newElement, CCI_ELEMENT_TYPE_NAME_VALUE); cpiSetElementName(&rc, newElement, data); if (pc->trace) { const char * mbData = mbString(data, pc->iCcsid); fprintf(pc->tracefile, "PLUGIN: Created new NAMEVALUE 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);