Package com.lowagie.text.html
Class SAXmyHtmlHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.lowagie.text.xml.SAXiTextHandler
com.lowagie.text.html.SAXmyHtmlHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
The
Tags-class maps several XHTML-tags to iText-objects.-
Field Summary
Fields inherited from class com.lowagie.text.xml.SAXiTextHandler
chapters, controlOpenClose, currentChunk, document, ignore, myTags, stack -
Constructor Summary
ConstructorsConstructorDescriptionSAXmyHtmlHandler(DocListener document) Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.SAXmyHtmlHandler(DocListener document, BaseFont bf) Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object.SAXmyHtmlHandler(DocListener document, HashMap htmlTags) Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on theDocument-object. -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(String uri, String lname, String name) This method gets called when an end tag is encountered.voidstartElement(String uri, String lname, 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, setControlOpenCloseMethods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
SAXmyHtmlHandler
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
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-
-
SAXmyHtmlHandler
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
-
-
Method Details
-
startElement
This method gets called when a start tag is encountered.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classSAXiTextHandler- Parameters:
uri- the Uniform Resource Identifierlname- 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
This method gets called when an end tag is encountered.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classSAXiTextHandler- Parameters:
uri- the Uniform Resource Identifierlname- the local name (without prefix), or the empty string if Namespace processing is not being performed.name- the name of the tag that ends
-