protected static PatternPairSet parsePatternPairSet(ResourceFile xmlFile)
			throws FileNotFoundException, IOException, SAXException {
		PatternPairSet pairSet = null;
		ErrorHandler handler = new ErrorHandler() {
			@Override
			public void error(SAXParseException exception) throws SAXException {
				throw new SAXException("Error: " + exception);
			}

			@Override
			public void fatalError(SAXParseException exception) throws SAXException {
				throw new SAXException("Fatal error: " + exception);
			}

			@Override
			public void warning(SAXParseException exception) throws SAXException {
				throw new SAXException("Warning: " + exception);
			}
		};
		XmlPullParser parser;
		try (InputStream inputStream = xmlFile.getInputStream()) {
			parser =
				new NonThreadedXmlPullParserImpl(inputStream, xmlFile.getName(), handler, false);
		}
		parser.start("patternlist");
		XmlElement el = parser.peek();
		while (el.isStart()) {
			if (el.getName().equals("patternpairs")) {
				pairSet = new PatternPairSet();
				pairSet.restoreXml(parser, new ClipboardPatternFactory());
			}
			el = parser.peek();
		}
		parser.end();
		return pairSet;
	}
Class for building the pattern clipboard
@param plugin
Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/ClipboardPanel.java