private void writeStackReference(StackReference ref, XmlWriter writer) {

		if (ref.getSource() == SourceType.USER_DEFINED) {
			if (ref.isStackReference()) {
				XmlAttributes attr = new XmlAttributes();
				addCommonRefAttributes(attr, ref);
				attr.addAttribute("STACK_PTR_OFFSET", ref.getStackOffset(), true);
				writer.writeElement("STACK_REFERENCE", attr);
			}
		}
	}
@param element
@param language
@param overwrite
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/MarkupXmlMgr.java