private void processComment(XmlElement element, XmlPullParser parser)
			throws AddressFormatException {
		String addrStr = element.getAttribute("ADDRESS");
		Address addr = XmlProgramUtilities.parseAddress(factory, addrStr);
		if (addr == null) {
			throw new AddressFormatException("Incompatible Comment Address: " + addrStr);
		}
		try {
			String typeStr = element.getAttribute("TYPE");
			CommentType commentType = getCommentType(typeStr);
			if (commentType == null) {
				log.appendMsg("Unknown comment type: " + typeStr);
				parser.discardSubTree(element);
				return;
			}
			element = parser.next();
			String comments = element.getText();

			CodeUnit cu = listing.getCodeUnitAt(addr);
			if (cu != null) {
				// if a comment already exists, then merge...
				//
				String currCmt = cu.getComment(commentType);
				if (currCmt == null || currCmt.length() == 0) {
					cu.setComment(commentType, comments);
				}
				else if (currCmt.indexOf(comments) < 0) {
					log.appendMsg("Merged " + typeStr + " comment at " + addr);
					cu.setComment(commentType, currCmt + "\n\n" + comments);
				}
			}
		}
		catch (Exception e) {
			log.appendException(e);
			parser.discardSubTree(element);
		}
	}
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