public class XHTMLContentHandler extends SafeContentHandler
Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
ENDLINE
The elements that get appended with the
NL character. |
static java.lang.String |
XHTML
The XHTML namespace URI
|
Constructor and Description |
---|
XHTMLContentHandler(org.xml.sax.ContentHandler handler,
Metadata metadata) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
characters(java.lang.String characters) |
void |
element(java.lang.String name,
java.lang.String value)
Emits an XHTML element with the given text content.
|
void |
endDocument()
Ends the XHTML document by writing the following footer and
clearing the namespace mappings:
|
void |
endElement(java.lang.String name) |
void |
endElement(java.lang.String uri,
java.lang.String local,
java.lang.String name)
Ends the given element.
|
void |
newline() |
void |
startDocument()
Starts an XHTML document by setting up the namespace mappings
when called for the first time.
|
void |
startElement(java.lang.String name) |
void |
startElement(java.lang.String name,
org.xml.sax.helpers.AttributesImpl attributes) |
void |
startElement(java.lang.String name,
java.lang.String attribute,
java.lang.String value) |
void |
startElement(java.lang.String uri,
java.lang.String local,
java.lang.String name,
org.xml.sax.Attributes attributes)
Starts the given element.
|
ignorableWhitespace
endPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, toString
public static final java.lang.String XHTML
public static final java.util.Set<java.lang.String> ENDLINE
NL
character.public XHTMLContentHandler(org.xml.sax.ContentHandler handler, Metadata metadata)
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class ContentHandlerDecorator
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
</body> </html>
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class SafeContentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String local, java.lang.String name, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class SafeContentHandler
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String local, java.lang.String name) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class SafeContentHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class SafeContentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startElement(java.lang.String name, java.lang.String attribute, java.lang.String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startElement(java.lang.String name, org.xml.sax.helpers.AttributesImpl attributes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void characters(java.lang.String characters) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void newline() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void element(java.lang.String name, java.lang.String value) throws org.xml.sax.SAXException
name
- XHTML element namevalue
- element value, possibly null
org.xml.sax.SAXException
- if the content element could not be writtenCopyright © 2010 - 2020 Adobe. All Rights Reserved