private void writeTypeDef(XmlWriter writer, TypeDef def) {
		XmlAttributes attrs = new XmlAttributes();
		attrs.addAttribute("NAME", def.getName());
		attrs.addAttribute("NAMESPACE", def.getCategoryPath().getPath());
		DataType dt = def.getDataType();
		attrs.addAttribute("DATATYPE", dt.getDisplayName());
		attrs.addAttribute("DATATYPE_NAMESPACE", dt.getCategoryPath().getPath());
		writer.startElement("TYPE_DEF", attrs);
		writer.endElement("TYPE_DEF");
	}
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