|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.io.BaseDOMFormatter | +--org.enhydra.xml.io.HTMLFormatter
Formatter for outputting a HTML DOM as a HTML text document.
Fields inherited from class org.enhydra.xml.io.BaseDOMFormatter |
ATTR_QUOTE_CHAR, ATTR_QUOTE_CHAR_ENTITY_REF, fDocType, fDocument, fDynamicFormattedElementCount, fOptions, fOut, fPreFormatMode, fPreFormattedElementCount, fPrettyPrinting, fPublicId, fSystemId, fTraverser, fUsePreFormattedAttrText, fUsePreFormattedElements, fUsePreFormattedText, MAX_ENTITY_QUICK_CHECK_CHAR |
Constructor Summary | |
HTMLFormatter(Node node,
OutputOptions outputOptions,
boolean forPreFormatting)
Constructor. |
Method Summary | |
(package private) static void |
Static constructor. |
protected String |
getCharacterEntity(char textChar)
Get a character entity name for a character. |
(package private) static OutputOptions |
getDefaultOutputOptions()
Get the default OutputOptions for a document formatter with this formatter. |
void |
handleAttr(Attr attr)
Handler called for Attr nodes. |
void |
handleCDATASection(CDATASection cdata)
Handler called for CDATASection nodes. |
void |
handleDocument(Document document)
Handler called for Document nodes. |
void |
handleDocumentFragment(DocumentFragment documentFragment)
Handler called for DocumentFragment nodes; just process children. |
void |
handleDocumentType(DocumentType documentType)
Handler called for Document nodes; should never be called. |
void |
handleElement(Element element)
Handler called for Element nodes. |
void |
handleProcessingInstruction(ProcessingInstruction pi)
Handler called for ProcessingInstruction nodes. |
void |
handleText(Text text)
Handler called for Text nodes. |
protected void |
writeOpenTag(Element element,
String tagName,
boolean hasChildren)
Write an element open tag. |
Methods inherited from class org.enhydra.xml.io.BaseDOMFormatter |
getDynamicFormattedElementCount, getDynamicFormattedTextCount, getMIMEEncoding, getPreFormattedElementCount, getPreFormattedTextCount, handleComment, handleEntity, handleEntityReference, handleNotation, preFormatNode, printIndent, usedPreFormattedElements, usedPreFormattedText, write, writeAttributeValue, writeln, writeText |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.enhydra.xml.io.Formatter |
getDynamicFormattedElementCount, getDynamicFormattedTextCount, getMIMEEncoding, getPreFormattedElementCount, getPreFormattedTextCount, preFormatNode, usedPreFormattedElements, usedPreFormattedText, write |
Constructor Detail |
public HTMLFormatter(Node node, OutputOptions outputOptions, boolean forPreFormatting)
Method Detail |
static void()
static OutputOptions getDefaultOutputOptions()
protected final String getCharacterEntity(char textChar)
BaseDOMFormatter
getCharacterEntity
in class BaseDOMFormatter
BaseDOMFormatter.getCharacterEntity(char)
public void handleDocument(Document document) throws IOException
DOMTraversal.Handler.handleDocument(org.w3c.dom.Document)
public void handleDocumentType(DocumentType documentType) throws IOException
DOMTraversal.Handler.handleDocumentType(org.w3c.dom.DocumentType)
public void handleDocumentFragment(DocumentFragment documentFragment)
DOMTraversal.Handler.handleDocumentFragment(org.w3c.dom.DocumentFragment)
public void handleAttr(Attr attr) throws IOException
DOMTraversal.Handler.handleAttr(org.w3c.dom.Attr)
protected final void writeOpenTag(Element element, String tagName, boolean hasChildren) throws IOException
writeOpenTag
in class BaseDOMFormatter
public void handleElement(Element element) throws IOException
This optionally corrects problem cases for browsers:
DOMTraversal.Handler.handleElement(org.w3c.dom.Element)
public void handleProcessingInstruction(ProcessingInstruction pi) throws IOException
DOMTraversal.Handler.handleProcessingInstruction(org.w3c.dom.ProcessingInstruction)
public void handleCDATASection(CDATASection cdata) throws IOException
DOMTraversal.Handler.handleCDATASection(org.w3c.dom.CDATASection)
public final void handleText(Text text) throws IOException
handleText
in class BaseDOMFormatter
DOMTraversal.Handler.handleText(org.w3c.dom.Text)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |