@Override protected Element createElement(String ns, String name, HtmlAttributes attributes, Element intendedParent) throws SAXException { return new Element(tokenizer, ns, name, name, attributes, true, null); }
@Override protected void appendElement(Element child, Element newParent) { newParent.appendChild(child); }
@Override protected void appendChildrenToNewParent(Element oldParent, Element newParent) throws SAXException { newParent.appendChildren(oldParent); }
@Override protected void insertFosterParentedChild(Element child, Element table, Element stackParent) throws SAXException { ParentNode parent = table.getParentNode(); if (parent != null) { // always an element if not null parent.insertBetween(child, previousSibling(table), table); cachedTablePreviousSibling = child; } else { stackParent.appendChild(child); } }
@Override protected void addAttributesToElement(Element element, HtmlAttributes attributes) throws SAXException { HtmlAttributes existingAttrs = (HtmlAttributes) element.getAttributes(); existingAttrs.merge(attributes); }
@Override protected boolean hasChildren(Element element) { return element.getFirstChild() != null; }
@Override protected void detachFromParent(Element element) throws SAXException { element.detach(); } }
@Override protected void insertFosterParentedChild(Element child, Element table, Element stackParent) throws SAXException { ParentNode parent = table.getParentNode(); if (parent != null) { // always an element if not null parent.insertBetween(child, previousSibling(table), table); cachedTablePreviousSibling = child; } else { stackParent.appendChild(child); } }
@Override protected void addAttributesToElement(Element element, HtmlAttributes attributes) throws SAXException { HtmlAttributes existingAttrs = (HtmlAttributes) element.getAttributes(); existingAttrs.merge(attributes); }
@Override protected boolean hasChildren(Element element) { return element.getFirstChild() != null; }
@Override protected void detachFromParent(Element element) throws SAXException { element.detach(); } }
@Override protected void insertFosterParentedChild(Element child, Element table, Element stackParent) throws SAXException { ParentNode parent = table.getParentNode(); if (parent != null) { // always an element if not null parent.insertBetween(child, previousSibling(table), table); cachedTablePreviousSibling = child; } else { stackParent.appendChild(child); } }
@Override protected void appendElement(Element child, Element newParent) { newParent.appendChild(child); }
@Override protected Element createElement(String ns, String name, HtmlAttributes attributes) throws SAXException { return new Element(tokenizer, ns, name, name, attributes, true, null); }
@Override protected void addAttributesToElement(Element element, HtmlAttributes attributes) throws SAXException { HtmlAttributes existingAttrs = (HtmlAttributes) element.getAttributes(); existingAttrs.merge(attributes); }
@Override protected boolean hasChildren(Element element) { return element.getFirstChild() != null; }
@Override protected void detachFromParent(Element element) throws SAXException { element.detach(); } }
@Override protected void appendChildrenToNewParent(Element oldParent, Element newParent) throws SAXException { newParent.appendChildren(oldParent); }
@Override protected void insertFosterParentedCharacters(char[] buf, int start, int length, Element table, Element stackParent) throws SAXException { Node child = new Characters(tokenizer, buf, start, length); ParentNode parent = table.getParentNode(); if (parent != null) { // always an element if not null parent.insertBetween(child, previousSibling(table), table); cachedTablePreviousSibling = child; } else { stackParent.appendChild(child); } }
@Override protected void appendElement(Element child, Element newParent) { newParent.appendChild(child); }