code: private static String nestedListToHtml( NestedList nl ){
  		if( nl == null ) {
  			return "null";
  		}
  
  		StringBuilder result = new StringBuilder();
  
  		if( nl.getClass()==NestedListElement.class ){
  			result.append( "<li>\n"+ contentElementToHtml( (NestedListElement)nl ) +"</li>\n" );
  		}
  		else{
  			result.append("<table class=\"NestedList\">\n" +
  					"<tr><th class=\"NestedList\">NestedList</th></tr>\n"+
  					"<tr><td class=\"NestedList\">" );
  
  			result.append((((NestedListContainer)nl).isNumbered()?"<ol>":"<ul>")+"\n" );
  			for( NestedList nl2 : ((NestedListContainer)nl).getNestedLists() ) {
  				result.append( nestedListToHtml( nl2 ) );
  			}
  			result.append((((NestedListContainer)nl).isNumbered()?"</ol>":"</ul>")+"\n");
  
  			result.append("</td></tr>\n" );
  			result.append("</table>\n");
  		}
  
  		return result.toString();
  	}
docs: Generates HTML Output for a {@link NestedList}.