OdfTextParagraph p0 = (OdfTextParagraph) lst.item(lst.getLength() - 1);
TableTableElement table = contentDom.newOdfElement(TableTableElement.class);
TableTableRowElement tr = table.newTableTableRowElement();
TableTableCellElement td1 = tr.newTableTableCellElement(0,"void");
TextPElement p1 = td1.newTextPElement();
p1.appendChild(contentDom.createTextNode("content 1"));
p0.getParentNode().insertBefore(table, p0);
table.setProperty(StyleTablePropertiesElement.Width, "12cm");
table.setProperty(StyleTablePropertiesElement.Align, "left");
td1.setProperty(StyleTableColumnPropertiesElement.ColumnWidth, "2cm");
XPath xpath = contentDom.getXPath();
TableTableRowElement tableRowTest = (TableTableRowElement) xpath.evaluate("//table:table-row [last()]", contentDom, XPathConstants.NODE);
Assert.assertNotNull(tableRowTest.getChildNodes());
Assert.assertTrue(tableRowTest.getChildNodes().item(0) instanceof TableTableCellElement);
Assert.assertEquals(tableRowTest.getChildNodes().item(0).getNodeName(), "table:table-cell");
contentDom.getDocument().save(ResourceUtilities.newTestOutputFile("CreateChildrenForTableTest.odt"));
} catch (Exception e) {
Logger.getLogger(CreateChildrenElementsTest.class.getName()).log(Level.SEVERE, e.getMessage(), e);