void read(XmlPullParser parser, TaskMonitor m, boolean addToProgram)
			throws CancelledException {
		this.monitor = m;

		// remove the default tree that is created when a program is instantiated
		if (!addToProgram) {
			listing.removeTree(Listing.DEFAULT_TREE_NAME);
		}

		XmlElement trees = parser.start("PROGRAM_TREES");
		while (parser.peek().isStart()) {
			if (m.isCancelled()) {
				throw new CancelledException();
			}
			XmlElement element = null;
			try {
				element = parser.next();
				processTree(element, parser);
			}
			catch (Exception e) {
				log.appendException(e);
				parser.discardSubTree(element);
			}
		}
		parser.end(trees);
	}
Read the Program tree section from an XML file.
@param parser parser for the XML
@param m monitor that can be canceled
@param addToProgram true if we are adding trees to an existing
program
@throws CancelledException if cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/ProgramTreeXmlMgr.java