code: private Element addElement(Document document, Element parent,
  			Map<ReportKey, Object> reportsData, ReportKey key, String value) {
  		if (reportsData.containsKey(key)) {
  			Element child = document.createElement(key.name().toLowerCase());
  			child.appendChild(document.createTextNode(value));
  			parent.appendChild(child);
  			return child;
  		}
  		return null;
  	}
docs: Generic method to add a element for a parent element given.