다음을 통해 공유


플랫 파일 구문 분석 엔진 호출

플랫 파일 구문 분석 엔진은 IFFDocumentSpec 인터페이스의 Parse 메서드를 호출하여 호출할 수 있습니다. 그러면 PipelineContext에서 검색된 에서 IDocumentSpec Interface typecast가 됩니다. Parse 메서드에서 반환된 XmlReader를 사용하면 클라이언트가 한 번에 하나의 노드를 검색할 수 있으므로 파서를 사용자 지정할 수 있습니다.

예제

XmlReader xr = docspec.Parse(new DataReader());  
while (xr.Read())  
{  
   switch(xr.NodeType)  
   {  
      case XmlNodeType.Element :  
         // Customize the element  
         //   
         break;  
      case XmlNodeType.Attribute :  
         // Customize the attribute  
         //   
         break;  
      // Customize other types of nodes  
      //   
   }  
}  

참고 항목

플랫 파일 구문 분석 엔진 사용