@Override protected Element createAndInsertFosterParentedElement(String ns, String name, HtmlAttributes attributes, Element table, Element stackParent) throws SAXException { try { Node parent = table.getParent(); Element child = createElement(ns, name, attributes, parent != null ? (Element) parent : stackParent); if (parent != null) { // always an element if not null ((ParentNode) parent).insertChild(child, indexOfTable(table, stackParent)); cachedTableIndex++; } else { stackParent.appendChild(child); } return child; } catch (XMLException e) { fatal(e); throw new RuntimeException("Unreachable"); } }
@Override protected Element createAndInsertFosterParentedElement(String ns, String name, HtmlAttributes attributes, Element table, Element stackParent) throws SAXException { try { Node parent = table.getParent(); Element child = createElement(ns, name, attributes, parent != null ? (Element) parent : stackParent); if (parent != null) { // always an element if not null ((ParentNode) parent).insertChild(child, indexOfTable(table, stackParent)); cachedTableIndex++; } else { stackParent.appendChild(child); } return child; } catch (XMLException e) { fatal(e); throw new RuntimeException("Unreachable"); } }