private static SafeHtml tableSectionToSafeHtml(TableSectionBuilder section, String tag) {
        if (!(section instanceof HtmlTableSectionBuilder)) {
            throw new IllegalArgumentException("Only HtmlTableSectionBuilder is supported at this time");
        }

        // Strip the table section tags off of the tbody.
        HtmlTableSectionBuilder htmlSection = (HtmlTableSectionBuilder) section;
        String rawHtml = htmlSection.asSafeHtml().asString();
        assert (tag.length()) == 5 : "Unrecognized tag: " + tag;
        assert rawHtml.startsWith("<" + tag + ">") : MALFORMED_HTML_SECTION;
        assert rawHtml.endsWith("</" + tag + ">") : MALFORMED_HTML_SECTION;
        rawHtml = rawHtml.substring(7, rawHtml.length() - 8);
        return SafeHtmlUtils.fromTrustedString(rawHtml);
    }
Get the {@link TableSectionElement} containing the children.

@param tag the expected tag (tbody, tfoot, or thead)
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractCellTable.java