플랫 파일 구문 분석 엔진은 IFFDocumentSpec 인터페이스의 Parse 메서드를 호출하여 사용할 수 있으며, 이는 PipelineContext에서 검색된 객체를 형식 캐스트한 것입니다IDocumentSpec Interface
.
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
//
}
}