private static void parseMapEntry(Element element, Map<String, String> nameMap,
			HashSet<String> toDuplicateCheckSet) throws SAXException {

		String fromName = element.getAttributeValue("from");
		String toName = element.getAttributeValue("to");
		if (fromName == null || toName == null) {
			throw new SAXException(
				element.getName() + " must include both 'from' and 'to' attributes");
		}
		if (toDuplicateCheckSet != null) {
			if (toDuplicateCheckSet.contains(toName)) {
				throw new SAXException(
					element.getName() + " may not map to the same name more than once: " + toName);
			}
			toDuplicateCheckSet.add(toName);
		}
		if (nameMap.containsKey(fromName)) {
			throw new SAXException(
				element.getName() + " may not map the same name more than once: " + fromName);
		}
		nameMap.put(fromName, toName);
	}
Generate a simple language translator from XML source

@param translatorSpecSource
@param languageTranslationElement
@return simple language translator
@throws SAXException
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/SimpleLanguageTranslator.java