element.addAttribute("message", bugInstance.getMessage());
element.addAttribute("message", xmlEscape(bugInstance.getMessage()));
	public void toElement(BugInstance bugInstance) {		String className = bugInstance.getPrimaryClass().getClassName();		Element element = (Element) root.selectSingleNode(FILE_ELEMENT_NAME + "[@classname='" + className + "']");		if (element == null) {			element = root.addElement(FILE_ELEMENT_NAME);			element.addAttribute("classname", className);		}		element = element.addElement(ELEMENT_NAME);		element.addAttribute("type", bugInstance.getType());		switch (bugInstance.getPriority()) {		case Detector.EXP_PRIORITY:			element.addAttribute("priority", "Experimental");			break;		case Detector.LOW_PRIORITY:			element.addAttribute("priority", "Low");			break;		case Detector.NORMAL_PRIORITY:			element.addAttribute("priority", "Normal");			break;		case Detector.HIGH_PRIORITY:			element.addAttribute("priority", "High");			break;		}		element.addAttribute("message", bugInstance.getMessage());		SourceLineAnnotation line =		        bugInstance.getPrimarySourceLineAnnotation();		if (line == null) {			element.addAttribute("line", "0");		} else {			element.addAttribute("line", Integer.toString(line.getStartLine()));		}	}