root.addAttribute("version", Version.RELEASE);
	public Document toDocument(Project project) {		Document document = DocumentHelper.createDocument();		Element root = document.addElement(ROOT_ELEMENT_NAME);		// Save the project information		Element projectElement = root.addElement(PROJECT_ELEMENT_NAME);		project.writeElement(projectElement);		// Save all of the bug instances		for (Iterator<BugInstance> i = this.iterator(); i.hasNext(); ) {			BugInstance bugInstance = i.next();			bugInstance.toElement(root);		}		// Save the error information		Element errorsElement = root.addElement(ERRORS_ELEMENT_NAME);		for (Iterator<String> i = errorIterator(); i.hasNext(); ) {			errorsElement.addElement(ANALYSIS_ERROR_ELEMENT_NAME).setText(i.next());		}		for (Iterator<String> i = missingClassIterator(); i.hasNext(); ) {			errorsElement.addElement(MISSING_CLASS_ELEMENT_NAME).setText(i.next());		}		// Save the HTML summary		String html = getSummaryHTML();		if (!html.equals("")) {			document.getRootElement().addElement(SUMMARY_HTML_ELEMENT_NAME).addCDATA(html);		}		return document;	}