code:     public boolean nextRow(ContentHandler handler, ParseContext context) throws IOException, SAXException {
          //lazy initialization
          if (results == null) {
              reset();
          }
          try {
              if (!results.next()) {
                  return false;
              }
          } catch (SQLException e) {
              throw new IOExceptionWithCause(e);
          }
          try {
              ResultSetMetaData meta = results.getMetaData();
              handler.startElement(XHTMLContentHandler.XHTML, "tr", "tr", EMPTY_ATTRIBUTES);
              for (int i = 1; i <= meta.getColumnCount(); i++) {
                  handler.startElement(XHTMLContentHandler.XHTML, "td", "td", EMPTY_ATTRIBUTES);
                  handleCell(meta, i, handler, context);
                  handler.endElement(XHTMLContentHandler.XHTML, "td", "td");
              }
              handler.endElement(XHTMLContentHandler.XHTML, "tr", "tr");
          } catch (SQLException e) {
              throw new IOExceptionWithCause(e);
          }
          rows++;
          return true;
      }
  
  