void write(XmlWriter writer, AddressSetView set, TaskMonitor monitor)
			throws CancelledException {
		monitor.setMessage("Writing COMMENTS ...");

		if (set == null) {
			set = program.getMemory();
		}

		writer.startElement("COMMENTS");

		CodeUnitIterator iter = listing.getCodeUnitIterator(CodeUnit.COMMENT_PROPERTY, set, true);

		while (iter.hasNext()) {
			monitor.checkCancelled();
			CodeUnit cu = iter.next();
			for (CommentType type : CommentType.values()) {
				if (monitor.isCancelled()) {
					return;
				}
				String comments = cu.getComment(type);
				if (comments != null) {
					writeComment(writer, cu.getMinAddress(), COMMENT_TAGS.get(type), comments);
				}
			}
		}
		writer.endElement("COMMENTS");
	}
Write out the XML for the external entry points.
@param writer writer for XML
@param set address set that is either the entire program or a selection
@param monitor monitor that can be canceled
should be written
@throws CancelledException if task is cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/CommentsXmlMgr.java