共用方式為


叫用一般檔案剖析引擎

您可以藉由呼叫IFFDocumentSpec介面的Parse方法來叫用一般檔案剖析引擎,而後者則是從 IDocumentSpec InterfacePipelineCoNtext擷取的 型別傳送。 因為從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  
      //   
   }  
}  

另請參閱

使用一般檔案剖析引擎