private void renderRegularHit(XMLWriter writer, Hit hit, int hitno) throws IOException {
        boolean renderedSimple = simpleRenderHit(writer, hit);

        if (renderedSimple) {
            return;
        }

        try {
            if (hit instanceof HitGroup) {
                renderHitGroup(writer, (HitGroup) hit);
            } else {
                renderSingularHit(writer, hit);
            }
        } catch (Exception e) {
            handleException(e);
        }

        if (hit instanceof HitGroup)
            renderHitGroup(writer, (HitGroup) hit, hitno);

        try {
            writer.closeTag();
        } catch (Exception e) {
            handleException(e);
        }
    }
Renders this hit as xml. The default implementation will call the simpleRender()
hook. If it returns true, nothing more is done, otherwise the
given template set will be used for rendering.


@param writer      the XMLWriter to append this hit to
@throws java.io.IOException if rendering fails
container-search/src/main/java/com/yahoo/search/rendering/SyncDefaultRenderer.java