@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 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 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 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 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 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 Element createAndInsertFosterParentedElement(String ns, String name, HtmlAttributes attributes, Element table, Element stackParent) throws SAXException { ParentNode parent = table.getParentNode(); Element child = createElement(ns, name, attributes, parent != null ? (Element) parent : stackParent); if (parent != null) { // always an element if not null parent.insertBetween(child, previousSibling(table), table); cachedTablePreviousSibling = child; } else { stackParent.appendChild(child); } return child; }
@Override protected Element createAndInsertFosterParentedElement(String ns, String name, HtmlAttributes attributes, Element table, Element stackParent) throws SAXException { ParentNode parent = table.getParentNode(); Element child = createElement(ns, name, attributes, parent != null ? (Element) parent : stackParent); if (parent != null) { // always an element if not null parent.insertBetween(child, previousSibling(table), table); cachedTablePreviousSibling = child; } else { stackParent.appendChild(child); } return child; }