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

		writer.startElement("SYMBOL_TABLE");

		SymbolIterator iter = symbolTable.getSymbolIterator();
		while (iter.hasNext()) {
			if (monitor.isCancelled()) {
				throw new CancelledException();
			}

			Symbol symbol = iter.next();
			SymbolType symbolType = symbol.getSymbolType();
			if (symbol.getSource() == SourceType.DEFAULT) {
				continue;
			}

			if (symbolType != SymbolType.LABEL && symbolType != SymbolType.FUNCTION) {
				continue;
			}

			Address addr = symbol.getAddress();
			if (set == null || set.contains(addr)) {
				XmlAttributes attrs = new XmlAttributes();
				attrs.addAttribute("ADDRESS", XmlProgramUtilities.toString(addr));
				attrs.addAttribute("NAME", symbol.getName());
				attrs.addAttribute("NAMESPACE", getNamespace(symbol));
				String type = checkGlobal(symbol) ? "global" : "local";
				attrs.addAttribute("TYPE", type);
				SourceType source = symbol.getSource();
				attrs.addAttribute("SOURCE_TYPE", source.toString());
				attrs.addAttribute("PRIMARY", symbol.isPrimary() ? "y" : "n");

				writer.startElement("SYMBOL", attrs);
				writer.endElement("SYMBOL");
			}
		}
		writer.endElement("SYMBOL_TABLE");
	}
Write out the XML for the symbol table.
@param writer writer for XML
@param monitor monitor that can be canceled
should be written
@throws IOException
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/SymbolTableXmlMgr.java