}
return true;
}
private Element findTable(Element cell) {
Node n = cell.getParentNode();
Element next;
if (n.getNodeType() == Node.ELEMENT_NODE) {
next = (Element)n;
if (next.getNodeName().equals("tr")) {
n = next.getParentNode();
if (n.getNodeType() == Node.ELEMENT_NODE) {
next = (Element)n;
String name = next.getNodeName();
if (name.equals("table")) {
return next;
}
if (name.equals("tbody") || name.equals("tfoot") || name.equals("thead")) {
n = next.getParentNode();
if (n.getNodeType() == Node.ELEMENT_NODE) {
next =(Element)n;
if (next.getNodeName().equals("table")) {
return next;
}
}