code: private static String tableToHtml( Table t ){
  
  		if( t == null ) {
  			return "null";
  		}
  
  		StringBuilder result = new StringBuilder();
  
  		int colspan;
  		try{
  			colspan = t.getTableElement( t.nrOfTableElements()-1 ).getCol()+1;
  		}catch( Exception e){
  			colspan = 1;
  		}
  
  		result.append("<table class=\"Table\">\n<tr><th colspan="+colspan+" class=\"Table\">Table");
  
  		if( t.getTitleElement()!=null ) {
  			result.append( contentElementToHtml( t.getTitleElement() ) );
  		}
  
  		result.append("</th></tr>\n<tr>\n");
  
  		int row = 0;
  		for( int i=0; i<t.nrOfTableElements(); i++ ){
  			TableElement td = t.getTableElement(i);
  			if( td.getRow() > row ){
  				result.append( "</tr><tr>\n");
  				row = td.getRow();
  			}
  
  			result.append( "<td class=\"Table\">\n" + tableElementToHtml( td ) +"</td>\n" );
  		}
  
  		result.append("</tr>\n</table>\n");
  		return result.toString();
  	}
docs: Generates HTML Output for a {@link Table}.