static void applyTo(XmlPullParser xmlParser, PdbParser pdbParser, TaskMonitor monitor,
			MessageLog log) throws CancelledException {
		monitor.setMessage("Applying enums...");
		while (xmlParser.hasNext()) {
			monitor.checkCancelled();
			XmlElement elem = xmlParser.next();

			if (elem.isEnd() && elem.getName().equals("enums")) {
				break;
			}

			String name = SymbolUtilities.replaceInvalidChars(elem.getAttribute("name"), false);
			int length = XmlUtilities.parseInt(elem.getAttribute("length"));
			EnumDataType enumdt = pdbParser.createEnum(name, length);

			while (xmlParser.hasNext()) {
				if (monitor.isCancelled()) {
					break;
				}
				elem = xmlParser.next();
				if (elem.isEnd() && elem.getName().equals("enum")) {
					break;
				}
				applyEnumMember(enumdt, elem, monitor, log);
				xmlParser.next();//member end element
			}
			pdbParser.cacheDataType(name, enumdt); // cache with namespace-based name
			pdbParser.getProgramDataTypeManager()
					.resolve(enumdt,
						DataTypeConflictHandler.REPLACE_EMPTY_STRUCTS_OR_RENAME_AND_ADD_HANDLER);
		}
	}
Perform parsing and applying of enum datatypes
@param pdbParser PDB parser object
@param xmlParser XML parser position immediately after the enums start element
@param monitor task monitor
@param log message log
@throws CancelledException if task cancelled
Ghidra/Features/PDB/src/main/java/ghidra/app/util/bin/format/pdb/ApplyEnums.java