private void writeDataType(XmlWriter writer, DataType dt) {
		if (dt instanceof Structure) {
			writeStructure(writer, (Structure) dt);
		}
		else if (dt instanceof Union) {
			writeUnion(writer, (Union) dt);
		}
		else if (dt instanceof TypeDef) {
			writeTypeDef(writer, (TypeDef) dt);
		}
		else if (dt instanceof FunctionDefinition) {
			writeFunctionDefinition(writer, (FunctionDefinition) dt);
		}
		else if (dt instanceof Enum) {
			writeEnum(writer, (Enum) dt);
		}
	}
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