code: private static String getTableHtml(String csvData, String delimiter) throws IOException {
  
          String lineSeparator = System.getProperty("line.separator");
          int tmpindex = csvData.indexOf(lineSeparator);
          String formatString = (tmpindex >= 0) ? csvData.substring(0, tmpindex) : csvData;
  
          if (delimiter == null) {
              delimiter = getPreferredDelimiter(csvData);
          }
  
          StringBuffer xml = new StringBuffer("<table>");
          if (isFormattingInformation(formatString, delimiter)) {
              // transform formatting to HTML colgroup
              xml.append(getColGroup(formatString, delimiter));
              // cut of first line
              csvData = csvData.substring(formatString.length() + lineSeparator.length());
          }
  
          String line;
          BufferedReader br = new BufferedReader(new StringReader(csvData));
          while ((line = br.readLine()) != null) {
              xml.append("<tr>\n");
  
              // must use tokenizer with delimiters include in order to handle empty cells appropriately
              StringTokenizer t = new StringTokenizer(line, delimiter, true);
              boolean hasValue = false;
              while (t.hasMoreElements()) {
                  String item = (String)t.nextElement();
                  if (!hasValue) {
                      xml.append("\t<td>");
                      hasValue = true;
                  }
                  if (!item.equals(delimiter)) {
  
                      // remove enclosing delimiters
                      item = removeStringDelimiters(item);
  
                      // in order to allow links, lines starting and ending with tag delimiters (< ...>) remains unescaped
                      if (item.startsWith(TAG_START_DELIMITER) && item.endsWith(TAG_END_DELIMITER)) {
                          xml.append(item);
                      } else {
                          xml.append(CmsStringUtil.escapeHtml(item));
                      }
                  } else {
                      xml.append("</td>\n");
                      hasValue = false;
                  }
              }
              if (hasValue) {
                  xml.append("</td>\n");
              } else {
                  xml.append("<td></td>\n");
              }
  
              xml.append("</tr>\n");
          }
  
          return xml.append("</table>").toString();
      }
docs: Converts CSV data to XML.<p>
  
  @return a XML representation of the CSV data
  
  @param csvData the CSV data to convert
  @param delimiter the delimiter to separate the values with
  
  @throws IOException if there is an IO problem