private void writeEnum(XmlWriter writer, Enum enuum) {
		XmlAttributes attrs = new XmlAttributes();
		attrs.addAttribute("NAME", enuum.getDisplayName());
		attrs.addAttribute("NAMESPACE", enuum.getCategoryPath().getPath());
		attrs.addAttribute("SIZE", enuum.getLength(), true);
		writer.startElement("ENUM", attrs);
		writeRegularComment(writer, enuum.getDescription());

		String[] names = enuum.getNames();
		for (String name : names) {
			attrs = new XmlAttributes();
			attrs.addAttribute("NAME", name);
			attrs.addAttribute("VALUE", enuum.getValue(name), true);
			attrs.addAttribute("COMMENT", enuum.getComment(name));
			writer.startElement("ENUM_ENTRY", attrs);
			writer.endElement("ENUM_ENTRY");
		}

		writer.endElement("ENUM");
	}
Writes datatypes into XML using the specified XML writer.
@param writer the XML writer
@param monitor the task monitor
@throws CancelledException if the user cancels the write operation
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/DataTypesXmlMgr.java