tblRow = node.getLastChild();
while( (tblRow != null)
// && (tblRow.getNodeType() == Node.TEXT_NODE)
// && tblRow.getNodeValue().trim().equals("")
&& tblRow.getTextContent().trim().equals("")
){
node.removeChild(tblRow);
tblRow = node.getLastChild();
}
-_-_-