新しい (現在接続されていない) 構文エレメントを、 指定したターゲット・エレメントの後の構文エレメント・ツリーに追加します。 新しく追加されるエレメントは、 ターゲット・エレメントの次の兄弟 になります。
void cpiAddAfter( int* returnCode, CciElement* targetElement, CciElement* newElement);
なし。エラーが発生した場合、returnCode がエラーの理由を示します。
void cpiSetElementValue( CciParser* parser, CciElement* element, CciElementValue* value ){ CciElement* newElement; int rc; if ((cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_VALUE) || (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME_VALUE)) { cpiSetElementValueValue(&rc, element, value); } else if (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME) { /* Create a new value element, add after the current value element, and set the value */ newElement = cpiCreateElement(&rc, parser); cpiSetElementType(&rc, newElement, CCI_ELEMENT_TYPE_VALUE); cpiSetElementValueValue(&rc, newElement, value); cpiAddAfter(&rc, element, newElement); } else { } return; }