Afterwards this element is empty.
10271028102910301031103210331034103510361037
if (("table".equals(name)) || ("tr".equals(name)) || ("td".equals(name))) { if (!child.isEmpty()) { // Insert the children for the child after the child itself. child.insertChildrenAfter(child); } // Now remove the child element. child.remove(); child = null;
11621163116411651166116711681169117011711172
// Make sure we remove any nested table elements in the child // first. removeNestedTables(child); // Insert the children for the child after the child itself. child.insertChildrenAfter(child); // We need to add a line break as we have stripped out a addLineBreak = true; }
12641265126612671268126912701271127212731274
br = factory.createElement("br"); br.insertBefore(child); } // Add all the children of child to the list after child. child.insertChildrenAfter(child); } // We need to add a line break between the end of this paragraph // and any other text. addLineBreak = true;
7879808182838485868788
public static void collapseElements(List elementsToBeDeleted) { Iterator i = elementsToBeDeleted.iterator(); while (i.hasNext()) { Element element = (Element)i.next(); element.insertChildrenAfter(element); element.remove(); } }