- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.lowagie.text.xml.SAXiTextHandler<HtmlPeer>
-
- com.lowagie.text.html.SAXmyHtmlHandler
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class SAXmyHtmlHandler extends SAXiTextHandler<HtmlPeer>
TheTags-class maps several XHTML-tags to iText-objects.
-
-
Field Summary
-
Fields inherited from class com.lowagie.text.xml.SAXiTextHandler
chapters, currentChunk, document, ignore, myTags, stack
-
-
Constructor Summary
Constructors Constructor Description SAXmyHtmlHandler(DocListener document)Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.SAXmyHtmlHandler(DocListener document, HtmlTagMap htmlTags)Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.SAXmyHtmlHandler(DocListener document, HtmlTagMap htmlTags, BaseFont bf)SAXmyHtmlHandler(DocListener document, BaseFont bf)Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendElement(String uri, String localName, String name)This method gets called when an end tag is encountered.voidstartElement(String uri, String localName, String name, Attributes attrs)This method gets called when a start tag is encountered.-
Methods inherited from class com.lowagie.text.xml.SAXiTextHandler
addImage, characters, handleEndingTags, handleStartingTags, ignorableWhitespace, isDocumentRoot, setBaseFont, setControlOpenClose
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
SAXmyHtmlHandler
public SAXmyHtmlHandler(DocListener document)
Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.- Parameters:
document- this is the document on which events must be triggered
-
SAXmyHtmlHandler
public SAXmyHtmlHandler(DocListener document, HtmlTagMap htmlTags)
Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.- Parameters:
document- this is the document on which events must be triggeredhtmlTags- a tagmap translating HTML tags to iText tags
-
SAXmyHtmlHandler
public SAXmyHtmlHandler(DocListener document, HtmlTagMap htmlTags, BaseFont bf)
-
SAXmyHtmlHandler
public SAXmyHtmlHandler(DocListener document, BaseFont bf)
Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.- Parameters:
document- this is the document on which events must be triggeredbf- the base class for the supported fonts
-
-
Method Detail
-
startElement
public void startElement(String uri, String localName, String name, Attributes attrs)
This method gets called when a start tag is encountered.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classSAXiTextHandler<HtmlPeer>- Parameters:
uri- the Uniform Resource IdentifierlocalName- the local name (without prefix), or the empty string if Namespace processing is not being performed.name- the name of the tag that is encounteredattrs- the list of attributes
-
endElement
public void endElement(String uri, String localName, String name)
This method gets called when an end tag is encountered.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classSAXiTextHandler<HtmlPeer>- Parameters:
uri- the Uniform Resource IdentifierlocalName- the local name (without prefix), or the empty string if Namespace processing is not being performed.name- the name of the tag that ends
-
-