private static String text2SimpleHtml(String htmlText){
  if (htmlText == null) {
    return null;
  }
  String replaceString=htmlText;
  StringBuffer result=new StringBuffer();
  boolean afterClose=true;
  int currentLineLength=0;
  for (int i=0; i < replaceString.length(); i++) {
    char c=replaceString.charAt(i);
    if (afterClose) {
      if (c == ' ') {
        continue;
      }
    }
    if (c == '<') {
      if (!afterClose) {
        result.append(Tools.getLineSeparator());
        currentLineLength=0;
      }
    }
    afterClose=false;
    result.append(c);
    currentLineLength++;
    if (currentLineLength > 70 && c == ' ') {
      result.append(Tools.getLineSeparator());
      currentLineLength=0;
    }
    if (c == '>') {
      result.append(Tools.getLineSeparator());
      currentLineLength=0;
      afterClose=true;
    }
  }
  return result.toString();
}

private static String text2SimpleHtml ( String htmlText ) { if ( htmlText == null ) { return null ; } String replaceString = htmlText ; StringBuffer result = new StringBuffer ( ) ; boolean afterClose = true ; int currentLineLength = 0 ; for ( int i = 0 ; i < replaceString . length ( ) ; i ++ ) { char c = replaceString . charAt ( i ) ; if ( afterClose ) { if ( c == ' ' ) { continue ; } } if ( c == '<' ) { if ( ! afterClose ) { result . append ( Tools . getLineSeparator ( ) ) ; currentLineLength = 0 ; } } afterClose = false ; result . append ( c ) ; currentLineLength ++ ; if ( currentLineLength > 70 && c == ' ' ) { result . append ( Tools . getLineSeparator ( ) ) ; currentLineLength = 0 ; } if ( c == '>' ) { result . append ( Tools . getLineSeparator ( ) ) ; currentLineLength = 0 ; afterClose = true ; } } return result . toString ( ) ; }
replaces the rapidminer specific tag elements by normal html tags . this method does not embed the given text in a root html tag .
