code: public static SectionContent eliminateEmptyStructures( SectionContent sc ){
  
  		for( int i=sc.nrOfParagraphs()-1; i>=0; i-- ){
  			Paragraph p = sc.getParagraph(i);
  			if( p.empty() ) sc.removeParagraph( p );
  		}
  		
  		for( int i=sc.nrOfDefinitionLists()-1; i>=0; i--){
  			DefinitionList dl = sc.getDefinitionList(i);
  			eliminateEmptyStructures( dl );
  			if( dl.empty() ) sc.removeDefinitionList( dl );
  		}
  		
  		for( int i=sc.nrOfNestedLists()-1; i>=0; i--){
  			NestedListContainer nl = sc.getNestedList(i);
  			eliminateEmptyStructures( nl );
  			if( nl.empty() ) sc.removeNestedList( nl );
  		}
  		
  		for( int i=sc.nrOfTables()-1; i>=0; i--){
  			Table t = sc.getTable(i);
  			eliminateEmptyStructures( t );
  			if( t.empty() ) sc.removeTable( t );
  		}
  		
  		return sc;
  	}
docs: Removes all empty Structures from a SectionContent and all substructures.