class XOMTreeBuilder extends CoalescingTreeBuilder<nu.xom.Element>
Modifier and Type | Field and Description |
---|---|
private nu.xom.Element |
cachedTable |
private int |
cachedTableIndex |
private nu.xom.Document |
document |
private SimpleNodeFactory |
nodeFactory |
charBuffer, charBufferLen, errorHandler, tokenizer
Modifier | Constructor and Description |
---|---|
protected |
XOMTreeBuilder(SimpleNodeFactory nodeFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttributesToElement(nu.xom.Element element,
HtmlAttributes attributes) |
protected void |
appendCharacters(nu.xom.Element parent,
java.lang.String text) |
protected void |
appendChildrenToNewParent(nu.xom.Element oldParent,
nu.xom.Element newParent) |
protected void |
appendComment(nu.xom.Element parent,
java.lang.String comment) |
protected void |
appendCommentToDocument(java.lang.String comment) |
protected void |
appendElement(nu.xom.Element child,
nu.xom.Element newParent) |
protected nu.xom.Element |
createElement(java.lang.String ns,
java.lang.String name,
HtmlAttributes attributes) |
protected nu.xom.Element |
createElement(java.lang.String ns,
java.lang.String name,
HtmlAttributes attributes,
nu.xom.Element form) |
protected nu.xom.Element |
createHtmlElementSetAsRoot(HtmlAttributes attributes) |
protected void |
detachFromParent(nu.xom.Element element) |
protected void |
documentMode(DocumentMode mode,
java.lang.String publicIdentifier,
java.lang.String systemIdentifier,
boolean html4SpecificAdditionalErrorChecks) |
protected void |
end() |
(package private) nu.xom.Document |
getDocument()
Returns the document.
|
(package private) nu.xom.Nodes |
getDocumentFragment() |
protected boolean |
hasChildren(nu.xom.Element element) |
private int |
indexOfTable(nu.xom.Element table,
nu.xom.Element stackParent) |
protected void |
insertFosterParentedCharacters(java.lang.String text,
nu.xom.Element table,
nu.xom.Element stackParent) |
protected void |
insertFosterParentedChild(nu.xom.Element child,
nu.xom.Element table,
nu.xom.Element stackParent) |
protected void |
start(boolean fragment) |
accumulateCharacters, appendCharacters, appendComment, appendCommentToDocument, appendIsindexPrompt, insertFosterParentedCharacters
appendDoctypeToDocument, cdataSectionAllowed, characters, comment, currentNode, doctype, elementPopped, elementPushed, endTag, endTokenization, eof, extractCharsetFromContent, fatal, 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
private final SimpleNodeFactory nodeFactory
private nu.xom.Document document
private int cachedTableIndex
private nu.xom.Element cachedTable
protected XOMTreeBuilder(SimpleNodeFactory nodeFactory)
protected void addAttributesToElement(nu.xom.Element element, HtmlAttributes attributes) throws org.xml.sax.SAXException
addAttributesToElement
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void appendCharacters(nu.xom.Element parent, java.lang.String text) throws org.xml.sax.SAXException
appendCharacters
in class CoalescingTreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void appendChildrenToNewParent(nu.xom.Element oldParent, nu.xom.Element newParent) throws org.xml.sax.SAXException
appendChildrenToNewParent
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void appendComment(nu.xom.Element parent, java.lang.String comment) throws org.xml.sax.SAXException
appendComment
in class CoalescingTreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void appendCommentToDocument(java.lang.String comment) throws org.xml.sax.SAXException
appendCommentToDocument
in class CoalescingTreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected nu.xom.Element createElement(java.lang.String ns, java.lang.String name, HtmlAttributes attributes) throws org.xml.sax.SAXException
createElement
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected nu.xom.Element createHtmlElementSetAsRoot(HtmlAttributes attributes) throws org.xml.sax.SAXException
createHtmlElementSetAsRoot
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void detachFromParent(nu.xom.Element element) throws org.xml.sax.SAXException
detachFromParent
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void appendElement(nu.xom.Element child, nu.xom.Element newParent) throws org.xml.sax.SAXException
appendElement
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected boolean hasChildren(nu.xom.Element element) throws org.xml.sax.SAXException
hasChildren
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
nu.xom.Document getDocument()
nu.xom.Nodes getDocumentFragment()
protected nu.xom.Element createElement(java.lang.String ns, java.lang.String name, HtmlAttributes attributes, nu.xom.Element form) throws org.xml.sax.SAXException
createElement
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
nu.validator.htmlparser.impl.TreeBuilder#createElement(String,
java.lang.String, org.xml.sax.Attributes, java.lang.Object)
protected void start(boolean fragment) throws org.xml.sax.SAXException
start
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
nu.validator.htmlparser.impl.TreeBuilder#start()
protected void documentMode(DocumentMode mode, java.lang.String publicIdentifier, java.lang.String systemIdentifier, boolean html4SpecificAdditionalErrorChecks) throws org.xml.sax.SAXException
documentMode
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
TreeBuilder.documentMode(nu.validator.htmlparser.common.DocumentMode,
java.lang.String, java.lang.String, boolean)
protected void insertFosterParentedCharacters(java.lang.String text, nu.xom.Element table, nu.xom.Element stackParent) throws org.xml.sax.SAXException
insertFosterParentedCharacters
in class CoalescingTreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
protected void insertFosterParentedChild(nu.xom.Element child, nu.xom.Element table, nu.xom.Element stackParent) throws org.xml.sax.SAXException
insertFosterParentedChild
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
private int indexOfTable(nu.xom.Element table, nu.xom.Element stackParent)
protected void end() throws org.xml.sax.SAXException
end
in class TreeBuilder<nu.xom.Element>
org.xml.sax.SAXException
TreeBuilder.end()