Package nu.validator.htmlparser.impl
Class CoalescingTreeBuilder<T>
java.lang.Object
nu.validator.htmlparser.impl.TreeBuilder<T>
nu.validator.htmlparser.impl.CoalescingTreeBuilder<T>
- All Implemented Interfaces:
TokenHandler
,TreeBuilderState<T>
A common superclass for tree builders that coalesce their text nodes.
- Version:
- $Id$
- Author:
- hsivonen
-
Field Summary
Fields inherited from class nu.validator.htmlparser.impl.TreeBuilder
charBuffer, charBufferLen, errorHandler, tokenizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
accumulateCharacters
(char[] buf, int start, int length) protected final void
appendCharacters
(T parent, char[] buf, int start, int length) protected abstract void
appendCharacters
(T parent, String text) protected final void
appendComment
(T parent, char[] buf, int start, int length) protected abstract void
appendComment
(T parent, String comment) protected final void
appendCommentToDocument
(char[] buf, int start, int length) protected abstract void
appendCommentToDocument
(String comment) protected void
appendIsindexPrompt
(T parent) protected final void
insertFosterParentedCharacters
(char[] buf, int start, int length, T table, T stackParent) protected abstract void
insertFosterParentedCharacters
(String text, T table, T stackParent) Methods inherited from class nu.validator.htmlparser.impl.TreeBuilder
addAttributesToElement, appendChildrenToNewParent, appendDoctypeToDocument, appendElement, cdataSectionAllowed, characters, comment, createElement, createElement, createHtmlElementSetAsRoot, currentNode, detachFromParent, doctype, documentMode, elementPopped, elementPushed, end, endTag, endTokenization, eof, extractCharsetFromContent, 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, zeroOriginatingReplacementCharacter
-
Constructor Details
-
CoalescingTreeBuilder
public CoalescingTreeBuilder()
-
-
Method Details
-
accumulateCharacters
- Overrides:
accumulateCharacters
in classTreeBuilder<T>
- Throws:
SAXException
-
appendCharacters
protected final void appendCharacters(T parent, char[] buf, int start, int length) throws SAXException - Specified by:
appendCharacters
in classTreeBuilder<T>
- Throws:
SAXException
- See Also:
-
appendIsindexPrompt
- Specified by:
appendIsindexPrompt
in classTreeBuilder<T>
- Throws:
SAXException
- See Also:
-
appendCharacters
- Throws:
SAXException
-
appendComment
- Specified by:
appendComment
in classTreeBuilder<T>
- Throws:
SAXException
- See Also:
-
appendComment
- Throws:
SAXException
-
appendCommentToDocument
- Specified by:
appendCommentToDocument
in 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:
insertFosterParentedCharacters
in classTreeBuilder<T>
- Throws:
SAXException
- See Also:
-
insertFosterParentedCharacters
protected abstract void insertFosterParentedCharacters(String text, T table, T stackParent) throws SAXException - Throws:
SAXException
-