public static Type getExtensionType(String nm, boolean isXML) throws SleighException {
		int pos = 0;
		if (isXML) {
			while (pos + 1 < nm.length() && (nm.charAt(pos) != '<' || nm.charAt(pos + 1) == '?') ||
				nm.charAt(pos + 1) == '!') {
				pos += 1;
			}
			pos += 1;
		}
		if (nm.length() <= pos) {
			throw new SleighException("Unrecognized extension");
		}
		switch (nm.charAt(pos)) {
			case 'c':
				if (nm.startsWith(Type.CALL_FIXUP.getTagName(), pos)) {
					return Type.CALL_FIXUP;
				}
				else if (nm.startsWith(Type.CALLOTHER_FIXUP.getTagName(), pos)) {
					return Type.CALLOTHER_FIXUP;
				}
				break;
			case 'p':
				if (nm.startsWith(Type.PROTOTYPE_MODEL.getTagName(), pos)) {
					return Type.PROTOTYPE_MODEL;
				}
				break;
			case 'r':
				if (nm.startsWith(Type.MERGE_MODEL.getTagName(), pos)) {
					return Type.MERGE_MODEL;
				}
				break;
		}
		throw new SleighException("Unrecognized extension");
	}
Get the extension type either from the XML tag name or the option name
@param nm is the XML tag or option name
@param isXML is true for an XML tag, false for an option name
@return the extension type
@throws SleighException if no type matches the name
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/SpecExtension.java