mrDach,
дополненный вариант
danik.js,
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<table>
<tr>
<td>Текст1</td>
<td>Текст2</td>
</tr>
<tr>
<td>Текст3</td>
<td>Текст4</td>
<td>
</td>
</tr>
</table>
<script>
var div = $("<div/>");
$(":not(:has(*), script)").each(function (index, self) {
/\S/.test($(self).text())&& div.append($(self).clone())
});
alert(div.html());
</script>
</body>
</html>