|
||||||||||
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.XMLFormatter
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, fPreserveSpace, fPrettyPrinting, fProcessingAttr, fPublicId, fSystemId, fTraverser, fUsePreFormattedAttrText, fUsePreFormattedElements, fUsePreFormattedText, MAX_ENTITY_QUICK_CHECK_CHAR |
Constructor Summary | |
XMLFormatter(Node node,
OutputOptions outputOptions,
boolean forPreFormatting)
Calls 4 argument constructor with forXHTMLFormatting as false |
|
XMLFormatter(Node node,
OutputOptions outputOptions,
boolean forPreFormatting,
boolean forXHTMLFormatting)
Constructor that provides for declaring if this is an XHTML document |
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; writes the DOCTYPE specification. |
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 XMLFormatter(Node node, OutputOptions outputOptions, boolean forPreFormatting)
public XMLFormatter(Node node, OutputOptions outputOptions, boolean forPreFormatting, boolean forXHTMLFormatting)
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
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
Non-standard extension: outputs data as-is if formatting HTML as XHTML.
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 |