/* SAXReader reader = new SAXReader(); Document document = reader.read(in);
	private void doReadXML(InputStream in, Project project) throws IOException, DocumentException {		checkInputStream(in);/*		SAXReader reader = new SAXReader();		Document document = reader.read(in);		Map<String, String> classToSourceFileMap = new HashMap<String, String>();		for (Iterator i = document.getRootElement().elements().iterator(); i.hasNext();) {			Element element = (Element) i.next();			String elementName = element.getName();			if (elementName.equals(SRCMAP_ELEMENT_NAME)) {				// Note: this is just for backwards compatibility.				classToSourceFileMap.put(element.attributeValue("classname"), element.attributeValue("srcfile"));			} else if (elementName.equals(PROJECT_ELEMENT_NAME)) {				project.readElement(element);			} else if (elementName.equals(ERRORS_ELEMENT_NAME)) {				readErrors(element);			} else if (elementName.equals(SUMMARY_HTML_ELEMENT_NAME)) {				setSummaryHTML(element.getText());			} else if (elementName.equals(APP_CLASS_ELEMENT_NAME)) {				// Ignore for backwards compatibility			} else {				XMLTranslator translator = XMLTranslatorRegistry.instance().getTranslator(elementName);				if (translator == null)					throw new DocumentException("Unknown element type: " + elementName);				BugInstance bugInstance = (BugInstance) translator.fromElement(element);				add(bugInstance);			}		}		// For any bug instances lacking source information,		// use the source map to add the information (if possible).		// This is just for backwards compatibility with the old		// SrcMap elements.		for (Iterator<BugInstance> i = this.iterator(); i.hasNext();) {			BugInstance bugInstance = i.next();			for (Iterator<BugAnnotation> j = bugInstance.annotationIterator(); j.hasNext();) {				BugAnnotation annotation = j.next();				if (annotation instanceof SourceLineAnnotation) {					updateSourceFile((SourceLineAnnotation) annotation, classToSourceFileMap);				} else if (annotation instanceof MethodAnnotation) {					SourceLineAnnotation srcLines = ((MethodAnnotation) annotation).getSourceLines();					if (srcLines != null)						updateSourceFile(srcLines, classToSourceFileMap);				}			}		}*/		try {			SAXBugCollectionHandler handler = new SAXBugCollectionHandler(this, project);			// FIXME: for now, use dom4j's XML parser			XMLReader xr = new org.dom4j.io.aelfred.SAXDriver();			xr.setContentHandler(handler);			xr.setErrorHandler(handler);			Reader reader = new InputStreamReader(in);			xr.parse(new InputSource(reader));		} catch (SAXException e) {			// FIXME: throw SAXException from method?			throw new DocumentException("Parse error", e);		}		// Presumably, project is now up-to-date		project.setModified(false);	}