public static AddressXML restoreRangeXml(XmlElement el, CompilerSpec cspec)
			throws XmlParseException {
		AddressXML result = new AddressXML();
		result.offset = 0;
		long last = -1;
		boolean seenLast = false;
		String attrvalue = el.getAttribute("space");
		if (attrvalue != null) {
			result.space = cspec.getAddressSpace(attrvalue);
			if (result.space == null) {
				throw new XmlParseException("Undefined space: " + attrvalue);
			}
		}
		attrvalue = el.getAttribute("first");
		if (attrvalue != null) {
			result.offset = SpecXmlUtils.decodeLong(attrvalue);
		}
		attrvalue = el.getAttribute("last");
		if (attrvalue != null) {
			last = SpecXmlUtils.decodeLong(attrvalue);
			seenLast = true;
		}
		attrvalue = el.getAttribute("name");
		if (attrvalue != null) {
			Register register = cspec.getLanguage().getRegister(attrvalue);
			result.space = register.getAddressSpace();
			result.offset = register.getOffset();
			last = (result.offset - 1) + register.getMinimumByteSize();
			seenLast = true;
		}
		if (result.space == null) {
			throw new XmlParseException("No address space indicated in range tag");
		}
		if (!seenLast) {
			last = result.space.getMaxAddress().getOffset();
		}
		result.size = (last - result.offset) + 1;
		return result;
	}
A memory range is read from attributes of an XML tag. The tag must either have:
   - "name" attribute - indicating a register 
   - "space" attribute - with optional "first" and "last" attributes

With the "space" attribute, "first" defaults to 0 and "last" defaults to the last offset in the space.
@param el is the XML element
@param cspec is a compiler spec to resolve address spaces and registers
@return an AddressXML object representing the range
@throws XmlParseException if the XML is badly formed
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/AddressXML.java