private static Element getRegisterElement(Register reg) {
		Element regElement =
			new Element(reg.isProcessorContext() ? "context_register" : "register");
		regElement.setAttribute("name", reg.getName());
		Address addr = reg.getAddress();
		if (addr.isRegisterAddress()) {
			regElement.setAttribute("offset", NumericUtilities.toHexString(addr.getOffset()));
		}
		else {
			regElement.setAttribute("address", addr.toString(true));
		}
		regElement.setAttribute("bitsize", Integer.toString(reg.getBitLength()));
		return regElement;
	}
Create old-language file for the specified language.
@param lang language
@param file output file
@throws IOException if file error occurs
@throws LanguageNotFoundException if lang is unknown to DefaultLanguageService
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguageFactory.java