private void writeFunction(XmlWriter writer, Function func) {
		XmlAttributes attrs = new XmlAttributes();
		attrs.addAttribute("ENTRY_POINT", XmlProgramUtilities.toString(func.getEntryPoint()));
		attrs.addAttribute("NAME", getName(func));
		attrs.addAttribute("LIBRARY_FUNCTION", isLibrary(func) ? "y" : "n");

		writer.startElement("FUNCTION", attrs);

		writeReturnType(writer, func);
		writeAddressRange(writer, func);
		writeRegularComment(writer, func.getComment());
		writeRepeatableComment(writer, func.getRepeatableComment());
		if (func.getSignatureSource() != SourceType.DEFAULT) {
			writeTypeInfoComment(writer, func);
		}
		writeStackFrame(writer, func);
		writeRegisterVars(writer, func);

		writer.endElement("FUNCTION");
	}
Parses a list of {@link Function function} definitions from xml and creates then, adding them to the current
{@link Program program}.
<p>
Information from a TYPEINFO_COMMENT is used in preference to information from RETURN_TYPE and STACK_FRAME/STACK_VARs that
are tagged as parameters.
<p>
DTD for the FUNCTION element:
<pre><code>
&lt;!ELEMENT FUNCTION (RETURN_TYPE?, ADDRESS_RANGE*, REGULAR_CMT?, REPEATABLE_CMT?, TYPEINFO_CMT?, STACK_FRAME?, REGISTER_VAR*)&gt;
</code></pre>

@param parser the parser
@param overwriteConflicts true to overwrite any conflicts
@param ignoreStackFrames true to ignore stack frames
@param monitor the task monitor
@throws AddressFormatException if any address is not parsable 
@throws CancelledException if the operation is cancelled through the monitor
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/FunctionsXmlMgr.java