public static long parseOptionalBoundedLongAttr(Element ele, String attrName, long defaultValue,
			long minValue, long maxValue) throws NumberFormatException {

		String value = ele.getAttributeValue(attrName);
		if (value == null || value.isEmpty()) {
			return defaultValue;
		}
		try {
			return parseBoundedLong(value, minValue, maxValue);
		}
		catch (NumberFormatException nfe) {
			throw new NumberFormatException("Attribute '" + attrName + "' bad value: " +
				nfe.getMessage() + " in " + toString(ele));
		}
	}
Parses the required attribute as a decimal number, returning its long
integer value.
<p>
Note, using {@link Long#MIN_VALUE} and/or {@link Long#MAX_VALUE} as lower
and upper bounds is problematic and should be avoided as the range check
will become a NO-OP and always succeed.

@param ele JDom element that contains the attribute.
@param attrName the name of the xml attribute to parse.
@param defaultValue the default value to return if attribute is missing.
@param minValue minimum value allowed (inclusive).
@param maxValue maximum value allowed (inclusive).
@return long integer value of the attribute.
@throws NumberFormatException if intStr could not be parsed or is out of
            range.
Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/XmlUtilities.java