Package org.apache.tika.sax
Class XHTMLContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.sax.SafeContentHandler
org.apache.tika.sax.XHTMLContentHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
Content handler decorator that simplifies the task of producing XHTML
events for Tika content parsers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Deprecated.voidcharacters(String characters) Deprecated.voidDeprecated.Emits an XHTML element with the given text content.voidDeprecated.Ends the XHTML document by writing the following footer and clearing the namespace mappings:voidendElement(String name) Deprecated.voidendElement(String uri, String local, String name) Deprecated.Ends the given element.voidnewline()Deprecated.voidDeprecated.Starts an XHTML document by setting up the namespace mappings when called for the first time.voidstartElement(String name) Deprecated.voidstartElement(String name, String attribute, String value) Deprecated.voidstartElement(String uri, String local, String name, Attributes attributes) Deprecated.Starts the given element.voidstartElement(String name, AttributesImpl attributes) Deprecated.Methods inherited from class org.apache.tika.sax.SafeContentHandler
ignorableWhitespaceMethods inherited from class org.apache.tika.sax.ContentHandlerDecorator
endPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, toStringMethods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
XHTML
Deprecated.The XHTML namespace URI- See Also:
-
ENDLINE
Deprecated.The elements that get appended with theNLcharacter.
-
-
Constructor Details
-
XHTMLContentHandler
Deprecated.
-
-
Method Details
-
startDocument
Deprecated.Starts an XHTML document by setting up the namespace mappings when called for the first time. The standard XHTML prefix is generated lazily when the first element is started.- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classContentHandlerDecorator- Throws:
SAXException
-
endDocument
Deprecated.Ends the XHTML document by writing the following footer and clearing the namespace mappings:</body> </html>
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classSafeContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String local, String name, Attributes attributes) throws SAXException Deprecated.Starts the given element. Table cells and list items are automatically indented by emitting a tab character as ignorable whitespace.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classSafeContentHandler- Throws:
SAXException
-
endElement
Deprecated.Ends the given element. Block elements are automatically followed by a newline character.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classSafeContentHandler- Throws:
SAXException
-
characters
Deprecated.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classSafeContentHandler- Throws:
SAXException- See Also:
-
startElement
Deprecated.- Throws:
SAXException
-
startElement
Deprecated.- Throws:
SAXException
-
startElement
Deprecated.- Throws:
SAXException
-
endElement
Deprecated.- Throws:
SAXException
-
characters
Deprecated.- Throws:
SAXException
-
newline
Deprecated.- Throws:
SAXException
-
element
Deprecated.Emits an XHTML element with the given text content. If the given text value is null or empty, then the element is not written.- Parameters:
name- XHTML element namevalue- element value, possiblynull- Throws:
SAXException- if the content element could not be written
-