Class XOMTreeBuilder

    • Field Detail

      • document

        private nu.xom.Document document
      • cachedTableIndex

        private int cachedTableIndex
      • cachedTable

        private nu.xom.Element cachedTable
    • Constructor Detail

    • Method Detail

      • addAttributesToElement

        protected void addAttributesToElement​(nu.xom.Element element,
                                              HtmlAttributes attributes)
                                       throws org.xml.sax.SAXException
        Specified by:
        addAttributesToElement in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • appendCharacters

        protected void appendCharacters​(nu.xom.Element parent,
                                        java.lang.String text)
                                 throws org.xml.sax.SAXException
        Specified by:
        appendCharacters in class CoalescingTreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • appendChildrenToNewParent

        protected void appendChildrenToNewParent​(nu.xom.Element oldParent,
                                                 nu.xom.Element newParent)
                                          throws org.xml.sax.SAXException
        Specified by:
        appendChildrenToNewParent in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • appendComment

        protected void appendComment​(nu.xom.Element parent,
                                     java.lang.String comment)
                              throws org.xml.sax.SAXException
        Specified by:
        appendComment in class CoalescingTreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • appendCommentToDocument

        protected void appendCommentToDocument​(java.lang.String comment)
                                        throws org.xml.sax.SAXException
        Specified by:
        appendCommentToDocument in class CoalescingTreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • createElement

        protected nu.xom.Element createElement​(java.lang.String ns,
                                               java.lang.String name,
                                               HtmlAttributes attributes)
                                        throws org.xml.sax.SAXException
        Specified by:
        createElement in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • createHtmlElementSetAsRoot

        protected nu.xom.Element createHtmlElementSetAsRoot​(HtmlAttributes attributes)
                                                     throws org.xml.sax.SAXException
        Specified by:
        createHtmlElementSetAsRoot in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • detachFromParent

        protected void detachFromParent​(nu.xom.Element element)
                                 throws org.xml.sax.SAXException
        Specified by:
        detachFromParent in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • appendElement

        protected void appendElement​(nu.xom.Element child,
                                     nu.xom.Element newParent)
                              throws org.xml.sax.SAXException
        Specified by:
        appendElement in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • hasChildren

        protected boolean hasChildren​(nu.xom.Element element)
                               throws org.xml.sax.SAXException
        Specified by:
        hasChildren in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • getDocument

        nu.xom.Document getDocument()
        Returns the document.
        Returns:
        the document
      • getDocumentFragment

        nu.xom.Nodes getDocumentFragment()
      • createElement

        protected nu.xom.Element createElement​(java.lang.String ns,
                                               java.lang.String name,
                                               HtmlAttributes attributes,
                                               nu.xom.Element form)
                                        throws org.xml.sax.SAXException
        Overrides:
        createElement in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
        See Also:
        nu.validator.htmlparser.impl.TreeBuilder#createElement(String, java.lang.String, org.xml.sax.Attributes, java.lang.Object)
      • start

        protected void start​(boolean fragment)
                      throws org.xml.sax.SAXException
        Overrides:
        start in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
        See Also:
        nu.validator.htmlparser.impl.TreeBuilder#start()
      • insertFosterParentedCharacters

        protected void insertFosterParentedCharacters​(java.lang.String text,
                                                      nu.xom.Element table,
                                                      nu.xom.Element stackParent)
                                               throws org.xml.sax.SAXException
        Specified by:
        insertFosterParentedCharacters in class CoalescingTreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • insertFosterParentedChild

        protected void insertFosterParentedChild​(nu.xom.Element child,
                                                 nu.xom.Element table,
                                                 nu.xom.Element stackParent)
                                          throws org.xml.sax.SAXException
        Specified by:
        insertFosterParentedChild in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
      • indexOfTable

        private int indexOfTable​(nu.xom.Element table,
                                 nu.xom.Element stackParent)
      • end

        protected void end()
                    throws org.xml.sax.SAXException
        Overrides:
        end in class TreeBuilder<nu.xom.Element>
        Throws:
        org.xml.sax.SAXException
        See Also:
        TreeBuilder.end()