cpiAddAsLastChild

목적

새(현재 연결되지 않은) 구문 요소를 지정된 대상 요소의 마지막 하위 요소로 구문 요소 트리에 추가합니다.

구문

void cpiAddAsLastChild(
  int*                   returnCode,
  CciElement*            targetElement,
CciElement*  newElement);

매개변수

returnCode
함수의 리턴 코드를 수신합니다(출력). 가능한 리턴 코드는 다음과 같습니다.
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
targetElement
대상 구문 요소 오브젝트의 주소를 지정합니다(입력).
newElement
트리 구조에 추가할 새 구문 요소 오브젝트의 주소를 지정합니다(입력).

리턴 값

없음. 오류가 발생할 경우, returnCode는 오류의 이유를 표시합니다.

샘플

다음 예는 샘플 구문 분석기 파일 BipSampPluginParser.c에서 발췌한 것입니다(209 - 228행).

          /* 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);
          /* Free the memory created in CciNString() */
        free((void *)data);
        /* Add the element */
        cpiAddAsLastChild(&rc, element, newElement);
관련 개념
사용자 정의 구문 분석기
사용자 정의 확장 구성요소
관련 태스크
C로 구문 분석기 작성
관련 참조
cpiAddAsFirstChild
C 구문 분석기 유틸리티 함수
주의사항 | 등록상표 | 다운로드 | 라이브러리 | 지원 | 피드백
Copyright IBM Corporation 1999, 2006 마지막 갱신 날짜: 5월 12, 2006
as08380_