com.itextpdf.tool.xml.html
Interface TagProcessor

All Known Implementing Classes:
AbstractTagProcessor, Anchor, Body, Break, Div, DummyTagProcessor, Header, HorizontalRule, Image, Link, Meta, NonSanitizedTag, OrderedUnorderedList, OrderedUnorderedListItem, ParaGraph, Span, Style, Table, TableData, TableRow, Title, XML

public interface TagProcessor

Author:
redlab_b

Method Summary
 List<Element> content(WorkerContext ctx, Tag tag, String content)
          This method is called if there is text content encountered between the opening and closing tags this TagProcessor is mapped to.
 List<Element> endElement(WorkerContext ctx, Tag tag, List<Element> currentContent)
          This method is called when a closing tag has been encountered of the TagProcessor implementation that is mapped to the tag.
 boolean isStackOwner()
           
 List<Element> startElement(WorkerContext ctx, Tag tag)
          This method is called when a tag has been encountered.
 

Method Detail

startElement

List<Element> startElement(WorkerContext ctx,
                           Tag tag)
This method is called when a tag has been encountered.

Parameters:
ctx - the WorkerContext
tag - the tag encountered
Returns:
Element an Element to add to the current content;

content

List<Element> content(WorkerContext ctx,
                      Tag tag,
                      String content)
This method is called if there is text content encountered between the opening and closing tags this TagProcessor is mapped to.

Parameters:
ctx - the WorkerContext
tag - the tag encountered
content - the text content between the tags this TagProcessor is mapped to.
Returns:
the element to add to the currentContent list

endElement

List<Element> endElement(WorkerContext ctx,
                         Tag tag,
                         List<Element> currentContent)
This method is called when a closing tag has been encountered of the TagProcessor implementation that is mapped to the tag.

Parameters:
ctx - the WorkerContext
tag - the tag encountered
currentContent - a list of content possibly created by TagProcessing of inner tags, and by startElement and content methods of this TagProcessor .
Returns:
the resulting element to add to the document or a content stack.

isStackOwner

boolean isStackOwner()
Returns:
true if the tag implementation must keep it's own currentContent stack.


Copyright © 2015. All Rights Reserved.