public String createHTMLRepresentationOfErrors(List<ErrorMessage> errors) {

        // only load the files if they are not already in memory
        if (baseHTML == null || injectedTableHTML == null) {
            loadFiles();
        }

        StringBuilder tables = new StringBuilder();
        for (ErrorMessage error : errors) {
            String tmpTable = injectedTableHTML;

            tmpTable = tmpTable.replaceAll("(TYPE)", error.getErrorLevel().toString());

            ErrorLevel level = error.getErrorLevel();
            String tag = null;

            if (level == ErrorLevel.ERROR)
                tag = "error-tag";
            else if (level == ErrorLevel.WARNING)
                tag = "warning-tag";
            else
                tag = "info-tag";

            tmpTable = tmpTable.replaceAll("(ERROR_CLASS)", tag);
            tmpTable = tmpTable.replaceAll("FILE", " - " + error.getFile());
            tmpTable = tmpTable.replaceAll("MESSAGE", error.getMessage());

            tables.append(tmpTable);
        }

        return baseHTML.replace("<INJECTED_CODE/>", tables.toString());
    }