Class CoalescingTreeBuilder<T>
java.lang.Object
nu.validator.htmlparser.impl.TreeBuilder<T>
nu.validator.htmlparser.impl.CoalescingTreeBuilder<T>
- All Implemented Interfaces:
TokenHandler, TreeBuilderState<T>
- Direct Known Subclasses:
DOMTreeBuilder, XOMTreeBuilder
A common superclass for tree builders that coalesce their text nodes.
- Version:
- $Id$
-
Field Summary
Fields inherited from class TreeBuilder
A, ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_NAV_OR_SECTION_OR_SUMMARY, ANNOTATION_XML, AREA_OR_WBR, B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U, BASE, BODY, BR, BUTTON, CAPTION, charBuffer, charBufferLen, COL, COLGROUP, COMMAND, DD_OR_DT, DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU, EMBED_OR_IMG, errorHandler, FIELDSET, FONT, FOREIGNOBJECT_OR_DESC, FORM, FRAME, FRAMESET, H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6, HEAD, HR, HTML, IFRAME, IMAGE, INPUT, ISINDEX, KEYGEN, LI, LINK_OR_BASEFONT_OR_BGSOUND, MARQUEE_OR_APPLET, MATH, MENUITEM, META, MGLYPH_OR_MALIGNMARK, MI_MO_MN_MS_MTEXT, NOBR, NOEMBED, NOFRAMES, NOSCRIPT, OBJECT, OPTGROUP, OPTION, OTHER, OUTPUT_OR_LABEL, P, PARAM_OR_SOURCE_OR_TRACK, PLAINTEXT, PRE_OR_LISTING, RT_OR_RP, RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR, SCRIPT, SELECT, STYLE, SVG, TABLE, TBODY_OR_THEAD_OR_TFOOT, TD_OR_TH, TEXTAREA, TITLE, tokenizer, TR, UL_OR_OL_OR_DL, XMP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaccumulateCharacters(char[] buf, int start, int length) protected final voidappendCharacters(T parent, char[] buf, int start, int length) protected abstract voidappendCharacters(T parent, String text) protected final voidappendComment(T parent, char[] buf, int start, int length) protected abstract voidappendComment(T parent, String comment) protected final voidappendCommentToDocument(char[] buf, int start, int length) protected abstract voidappendCommentToDocument(String comment) protected voidappendIsindexPrompt(T parent) protected final voidinsertFosterParentedCharacters(char[] buf, int start, int length, T table, T stackParent) protected abstract voidinsertFosterParentedCharacters(String text, T table, T stackParent) Methods inherited from class TreeBuilder
addAttributesToElement, appendChildrenToNewParent, appendDoctypeToDocument, appendElement, cdataSectionAllowed, characters, comment, createElement, createElement, createHtmlElementSetAsRoot, currentNode, detachFromParent, doctype, documentMode, elementPopped, elementPushed, end, endTag, endTokenization, eof, err, errNoCheck, extractCharsetFromContent, fatal, fatal, fatal, flushCharacters, getDeepTreeSurrogateParent, getErrorHandler, getFormPointer, getHeadPointer, getListOfActiveFormattingElements, getListOfActiveFormattingElementsLength, getMode, getOriginalMode, getStack, getStackLength, hasChildren, insertFosterParentedChild, isFramesetOk, isNeedToDropLF, isQuirks, isScriptingEnabled, loadState, markMalformedIfScript, newSnapshot, requestSuspension, setDoctypeExpectation, setDocumentModeHandler, setErrorHandler, setFragmentContext, setFragmentContext, setIgnoringComments, setNamePolicy, setReportingDoctype, setScriptingEnabled, snapshotMatches, start, startTag, startTokenization, wantsComments, warn, warn, zeroOriginatingReplacementCharacter
-
Constructor Details
-
CoalescingTreeBuilder
public CoalescingTreeBuilder()
-
-
Method Details
-
accumulateCharacters
- Overrides:
accumulateCharactersin classTreeBuilder<T>- Throws:
SAXException
-
appendCharacters
protected final void appendCharacters(T parent, char[] buf, int start, int length) throws SAXException - Specified by:
appendCharactersin classTreeBuilder<T>- Throws:
SAXException- See Also:
-
appendIsindexPrompt
- Specified by:
appendIsindexPromptin classTreeBuilder<T>- Throws:
SAXException- See Also:
-
appendCharacters
- Throws:
SAXException
-
appendComment
- Specified by:
appendCommentin classTreeBuilder<T>- Throws:
SAXException- See Also:
-
appendComment
- Throws:
SAXException
-
appendCommentToDocument
- Specified by:
appendCommentToDocumentin classTreeBuilder<T>- Throws:
SAXException- See Also:
-
appendCommentToDocument
- Throws:
SAXException
-
insertFosterParentedCharacters
protected final void insertFosterParentedCharacters(char[] buf, int start, int length, T table, T stackParent) throws SAXException - Specified by:
insertFosterParentedCharactersin classTreeBuilder<T>- Throws:
SAXException- See Also:
-
insertFosterParentedCharacters
protected abstract void insertFosterParentedCharacters(String text, T table, T stackParent) throws SAXException - Throws:
SAXException
-