Table of Contents

Class TagTreeIterator

Namespace
iText.Kernel.Pdf.Tagutils
Assembly
itext.kernel.dll

This class is used to traverse the tag tree.

public class TagTreeIterator
Inheritance
TagTreeIterator
Inherited Members

Remarks

This class is used to traverse the tag tree.

There is a possibility to add a handler that will be called for the elements during the traversal.

Constructors

TagTreeIterator(IStructureNode)

Creates a new instance of TagTreeIterator.

public TagTreeIterator(IStructureNode tagTreePointer)

Parameters

tagTreePointer IStructureNode

the tag tree pointer.

Remarks

Creates a new instance of TagTreeIterator . It will use TagTreeIteratorElementApprover to filter elements and TreeTraversalOrder.PRE_ORDER for tree traversal.

TagTreeIterator(IStructureNode, TagTreeIteratorElementApprover, TreeTraversalOrder)

Creates a new instance of TagTreeIterator.

public TagTreeIterator(IStructureNode tagTreePointer, TagTreeIteratorElementApprover approver, TagTreeIterator.TreeTraversalOrder traversalOrder)

Parameters

tagTreePointer IStructureNode

the tag tree pointer.

approver TagTreeIteratorElementApprover

a filter that will be called to let iterator know whether some particular element should be traversed or not.

traversalOrder TagTreeIterator.TreeTraversalOrder

an order in which the tree will be traversed.

Methods

AddHandler(ITagTreeIteratorHandler)

Adds a handler that will be called for the elements during the traversal.

public virtual TagTreeIterator AddHandler(ITagTreeIteratorHandler handler)

Parameters

handler ITagTreeIteratorHandler

the handler.

Returns

TagTreeIterator

this TagTreeIterator instance.

Traverse()

Traverses the tag tree in the order of the document structure.

public virtual void Traverse()

Remarks

Traverses the tag tree in the order of the document structure.

Make sure the correct handlers are added before calling this method.