public static List<MachoPrelinkMap> parsePrelinkXml(ByteProvider provider, TaskMonitor monitor)
			throws IOException, JDOMException {

		try {
			MachHeader mainHeader = new MachHeader(provider);
			mainHeader.parse(); // make sure first Mach-O header is valid....

			monitor.setMessage("Parsing PRELINK XML...");
			return new MachoPrelinkParser(mainHeader, provider).parse(monitor);
		}
		catch (NoPreLinkSectionException | MachException e) {
			return Collections.emptyList();
		}
	}
Parses the provider looking for PRELINK XML.

@param provider The provider to parse.
@param monitor A monitor.
@return A list of discovered {@link MachoPrelinkMap}s.  An empty list indicates that the provider
  did not represent valid Mach-O PRELINK binary.
@throws IOException if there was an IO-related issue.
@throws JDOMException if there was a issue parsing the PRELINK XML.
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoPrelinkUtils.java