Base class for custom document visitors.
For a list of all members of this type, see DocumentVisitor Members.
System.Object
Aspose.Words.DocumentVisitor
[Visual Basic]
MustInherit Public Class DocumentVisitor
[C#]public abstract class DocumentVisitor
Remarks
With DocumentVisitor you can define and execute custom operations that require enumeration over the document tree.
For example, Aspose.Words uses DocumentVisitor internally for saving Document in various formats and for other operations like finding fields or bookmarks over a fragment of a document.
To use DocumentVisitor:
- Create a class derived from DocumentVisitor.
- Override and provide implementations for some or all of the VisitXXX methods to perform some custom operations.
- Call Node.Accept on the Node that you want to start the enumeration from.
DocumentVisitor provides default implementations for all of the VisitXXX methods to make it easier to create new document visitors as only the methods required for the particular visitor need to be overridden. It is not necessary to override all of the visitor methods.
For more information see the Visitor design pattern.