private Set<String> getKnownExtensions(Element xml) {
		Set<String> knownExtensionNames = new HashSet<>();
		Element extensionsParent = xml.getChild(EXTENSIONS_XML_NAME);
		if (extensionsParent == null) {
			return knownExtensionNames;
		}

		Iterator<?> it = extensionsParent.getChildren(EXTENSION_ELEMENT_NAME).iterator();
		while (it.hasNext()) {
			Element child = (Element) it.next();
			String encodedValue = child.getAttributeValue(EXTENSION_ATTRIBUTE_NAME_ENCODED);
			if (encodedValue != null) {
				byte[] bytes = NumericUtilities.convertStringToBytes(encodedValue);
				String decoded = new String(bytes, StandardCharsets.UTF_8);
				knownExtensionNames.add(decoded);
			}
			else {
				String name = child.getAttributeValue(EXTENSION_ATTRIBUTE_NAME);
				knownExtensionNames.add(name);
			}
		}
		return knownExtensionNames;
	}
A class to manage saving and restoring of known extension used by this tool.
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ExtensionManager.java