Package nu.validator.htmlparser.sax
Class SAXStreamer
- All Implemented Interfaces:
TokenHandler,TreeBuilderState<Attributes>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContentHandlerprivate static final char[]private LexicalHandlerFields inherited from class nu.validator.htmlparser.impl.TreeBuilder
charBuffer, charBufferLen, errorHandler, tokenizer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAttributesToElement(Attributes element, HtmlAttributes attributes) protected voidappendCharacters(Attributes parent, char[] buf, int start, int length) protected voidappendChildrenToNewParent(Attributes oldParent, Attributes newParent) protected voidappendComment(Attributes parent, char[] buf, int start, int length) protected voidappendCommentToDocument(char[] buf, int start, int length) protected voidappendDoctypeToDocument(String name, String publicIdentifier, String systemIdentifier) protected voidappendElement(Attributes child, Attributes newParent) protected voidappendIsindexPrompt(Attributes parent) protected AttributescreateElement(String ns, String name, HtmlAttributes attributes) protected AttributescreateHtmlElementSetAsRoot(HtmlAttributes attributes) protected voiddetachFromParent(Attributes element) protected voidelementPopped(String ns, String name, Attributes node) protected voidelementPushed(String ns, String name, Attributes node) protected voidend()protected voidfatal()Reports an condition that would make the infoset incompatible with XML 1.0 as fatal.protected booleanhasChildren(Attributes element) protected voidinsertFosterParentedCharacters(char[] buf, int start, int length, Attributes table, Attributes stackParent) protected voidinsertFosterParentedChild(Attributes child, Attributes table, Attributes stackParent) voidsetContentHandler(ContentHandler handler) voidsetLexicalHandler(LexicalHandler handler) protected voidstart(boolean fragment) Methods inherited from class nu.validator.htmlparser.impl.TreeBuilder
accumulateCharacters, cdataSectionAllowed, characters, comment, createElement, currentNode, doctype, documentMode, endTag, endTokenization, eof, extractCharsetFromContent, fatal, flushCharacters, getDeepTreeSurrogateParent, getErrorHandler, getFormPointer, getHeadPointer, getListOfActiveFormattingElements, getListOfActiveFormattingElementsLength, getMode, getOriginalMode, getStack, getStackLength, isFramesetOk, isNeedToDropLF, isQuirks, isScriptingEnabled, loadState, markMalformedIfScript, newSnapshot, requestSuspension, setDoctypeExpectation, setDocumentModeHandler, setErrorHandler, setFragmentContext, setFragmentContext, setIgnoringComments, setNamePolicy, setReportingDoctype, setScriptingEnabled, snapshotMatches, startTag, startTokenization, wantsComments, zeroOriginatingReplacementCharacter
-
Field Details
-
ISINDEX_PROMPT
private static final char[] ISINDEX_PROMPT -
contentHandler
-
lexicalHandler
-
-
Constructor Details
-
SAXStreamer
SAXStreamer()
-
-
Method Details
-
addAttributesToElement
protected void addAttributesToElement(Attributes element, HtmlAttributes attributes) throws SAXException - Specified by:
addAttributesToElementin classTreeBuilder<Attributes>- Throws:
SAXException
-
appendCharacters
protected void appendCharacters(Attributes parent, char[] buf, int start, int length) throws SAXException - Specified by:
appendCharactersin classTreeBuilder<Attributes>- Throws:
SAXException
-
appendIsindexPrompt
- Specified by:
appendIsindexPromptin classTreeBuilder<Attributes>- Throws:
SAXException- See Also:
-
appendChildrenToNewParent
protected void appendChildrenToNewParent(Attributes oldParent, Attributes newParent) throws SAXException - Specified by:
appendChildrenToNewParentin classTreeBuilder<Attributes>- Throws:
SAXException
-
appendComment
protected void appendComment(Attributes parent, char[] buf, int start, int length) throws SAXException - Specified by:
appendCommentin classTreeBuilder<Attributes>- Throws:
SAXException
-
appendCommentToDocument
- Specified by:
appendCommentToDocumentin classTreeBuilder<Attributes>- Throws:
SAXException
-
createElement
protected Attributes createElement(String ns, String name, HtmlAttributes attributes) throws SAXException - Specified by:
createElementin classTreeBuilder<Attributes>- Throws:
SAXException
-
createHtmlElementSetAsRoot
- Specified by:
createHtmlElementSetAsRootin classTreeBuilder<Attributes>- Throws:
SAXException
-
detachFromParent
- Specified by:
detachFromParentin classTreeBuilder<Attributes>- Throws:
SAXException
-
appendElement
- Specified by:
appendElementin classTreeBuilder<Attributes>- Throws:
SAXException
-
hasChildren
- Specified by:
hasChildrenin classTreeBuilder<Attributes>- Throws:
SAXException
-
setContentHandler
-
setLexicalHandler
-
appendDoctypeToDocument
protected void appendDoctypeToDocument(String name, String publicIdentifier, String systemIdentifier) throws SAXException - Overrides:
appendDoctypeToDocumentin classTreeBuilder<Attributes>- Throws:
SAXException- See Also:
-
elementPopped
- Overrides:
elementPoppedin classTreeBuilder<Attributes>- Throws:
SAXException- See Also:
-
elementPushed
- Overrides:
elementPushedin classTreeBuilder<Attributes>- Throws:
SAXException- See Also:
-
end
- Overrides:
endin classTreeBuilder<Attributes>- Throws:
SAXException- See Also:
-
start
- Overrides:
startin classTreeBuilder<Attributes>- Throws:
SAXException- See Also:
-
fatal
Description copied from class:TreeBuilderReports an condition that would make the infoset incompatible with XML 1.0 as fatal.- Overrides:
fatalin classTreeBuilder<Attributes>- Throws:
SAXException
-
insertFosterParentedCharacters
protected void insertFosterParentedCharacters(char[] buf, int start, int length, Attributes table, Attributes stackParent) throws SAXException - Specified by:
insertFosterParentedCharactersin classTreeBuilder<Attributes>- Throws:
SAXException
-
insertFosterParentedChild
protected void insertFosterParentedChild(Attributes child, Attributes table, Attributes stackParent) throws SAXException - Specified by:
insertFosterParentedChildin classTreeBuilder<Attributes>- Throws:
SAXException
-