public synchronized Element toXml() {
Element xmlReport = new Element("report");
xmlReport.setAttribute("total", getTotalRecords() + "");
xmlReport.setAttribute("startDate", startDate.toString());
xmlReport.setAttribute("reportDate", new ISODate().toString());
xmlReport.setAttribute("running", String.valueOf(isProcessing()));
xmlReport.setAttribute("totalRecords", totalRecords + "");
xmlReport.setAttribute("processedRecords", processedRecords + "");
xmlReport.setAttribute("nullRecords", nullRecords + "");