cniSearchElementInNamespace 그룹

지정된 기준에 맞는 요소를 검색합니다. 검색은 요소 인수에 지정된 구문 요소에서 시작되며, 다음 네 함수는 각각 서로 다른 트리 방향으로 검색을 제공합니다.
  1. cniSearchFirstChildInNamespace는 일치항목이 발견될 때 또는 하위 요소 체인의 끝에 도달할 때까지 첫 번째 하위 요소에서부터 시작 요소 바로 아래의 하위 요소를 검색합니다.
  2. cniSearchLastChildInNamespace는 일치항목이 발견될 때 또는 하위 요소 체인의 끝에 도달할 때까지 마지막 하위 요소에서부터 시작 요소의 바로 아래의 하위 요소를 검색합니다.
  3. cniSearchNextSiblingInNamespace는 일치항목이 발견될 때 또는 동위 요소 체인의 끝에 도달할 때까지 시작 요소에서부터 다음 동위 요소를 검색합니다.
  4. cniSearchPreviousSiblingInNamespace는 일치항목이 발견될 때 또는 동위 요소 체인의 끝에 도달할 때까지 시작 요소에서부터 이전 동위 요소를 검색합니다.

네임스페이스를 인식하는 도메인에 속하는 메시지를 검색할 때 사용됩니다.

구문

void cniSearchFirstChildInNamespace(
	int*           returnCode,
	CciElement*    targetElement,
	CciCompareMode mode,
	const CciChar* nameSpace,
	const CciChar* name,
	CciElementType type)		

void cniSearchLastChildInNamespace(
	int*           returnCode,
	CciElement*    targetElement,
	CciCompareMode mode,
	const CciChar* nameSpace,
	const CciChar* name,
	CciElementType type)		

void cniSearchNextSiblingInNamespace(
	int*           returnCode,
	CciElement*    targetElement,
	CciCompareMode mode,
	const CciChar* nameSpace,
	const CciChar* name,
	CciElementType type)		

void cniSearchPreviousSiblingInNamespace(
	int*           returnCode,
	CciElement*    targetElement,
	CciCompareMode mode,
	CciElementType type,
	const CciChar* nameSpace,
	const CciChar* name)		

매개변수

returnCode
함수의 리턴 코드(출력). 널(null) 포인터는 노드가 오류를 처리하지 않음을 의미합니다. 입력이 널(null)이 아닌 경우, 출력은 호출 성공 상태를 의미합니다. 이 호출 실행 중 전달된 모든 예외는 플로우의 다음 업스트림 노드에 다시 전달됩니다. 예외에 대한 자세한 내용은 cciGetLastExceptionData를 호출하십시오. 함수의 리턴 코드(출력).
가능한 리턴 코드는 다음과 같습니다.
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
targetElement
검색이 시작되는 구문 요소 오브젝트의 주소(입력)
mode
사용할 검색 모드(입력). 요소 네임스페이스, 요소 유형 및 요소 이름의 어떤 조합을 검색할 것인지 나타냅니다. 사용 가능한 값은 다음과 같습니다.
  • CCI_COMPARE_MODE_SPACE
  • CCI_COMPARE_MODE_SPACE_FULL_TYPE
  • CCI_COMPARE_MODE_SPACE_GENERIC_TYPE
  • CCI_COMPARE_MODE_SPACE_SPECIFIC_TYPE
  • CCI_COMPARE_MODE_SPACE_NAME
  • CCI_COMPARE_MODE_SPACE_NAME_FULL_TYPE
  • CCI_COMPARE_MODE_SPACE_NAME_GENERIC_TYPE
  • CCI_COMPARE_MODE_SPACE_NAME_SPECIFIC_TYPE
  • CCI_COMPARE_MODE_NULL
비교 모드에서 네임스페이스 일치항목 검색을 수행하지 않을 경우, 모든 네임스페이스가 검색됩니다. 이는 빈 문자열 네임스페이스만 검색되는 cniSearchElement 그룹의 작동과는 다릅니다. 위의 모드 중 하나를 지정할 때는 nameSpace 매개변수를 빈 문자열로 설정하십시오.
type
검색할 요소 유형(입력). 검색 모드에서 유형 일치항목 검색을 수행할 때만 사용됩니다.
nameSpace
검색할 네임스페이스(입력). 검색 모드에서 네임스페이스 일치항목 검색을 수행할 때만 사용됩니다.
name
검색할 이름(입력). 검색 모드에서 이름 일치항목 검색을 수행할 때만 사용됩니다.

리턴 값

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

 mode=CCI_COMPARE_MODE_SPACE ;
 ...

         if (forward) {
            firstChild = cniSearchFirstChildInNamespace(&rc, element, mode, space, 0,0);
          }else{
            firstChild = cniSearchLastChildInNamespace(&rc, element, mode, space, 0,0);

    }

        if (firstChild) {
            depth++;
            traceElement(firstChild,forward,space);
            depth--;
    }
        currentElement = firstChild;
        do{

            if (forward) {
                nextSibling = cniSearchNextSiblingInNamespace(&rc, currentElement,mode,space,0,0);
            }else{
                nextSibling = cniSearchPreviousSiblingInNamespace(&rc, currentElement,mode,space,0,0);
      }
            if (nextSibling) {
                traceElement(nextSibling,forward,space);
                currentElement=nextSibling;
      }

        }while (nextSibling) ;
    
  }
주의사항 | 등록상표 | 다운로드 | 라이브러리 | 지원 | 피드백
Copyright IBM Corporation 1999, 2006 마지막 갱신 날짜: 2006/08/21
as07744_