public void restoreXml(XmlPullParser parser, PatternFactory pfactory) throws IOException {
		XmlElement el = parser.start("patternpairs");
		totalBitsOfCheck = SpecXmlUtils.decodeInt(el.getAttribute("totalbits"));
		postBitsOfCheck = SpecXmlUtils.decodeInt(el.getAttribute("postbits"));
		parser.start("prepatterns");
		el = parser.peek();
		while (el.isStart()) {
			DittedBitSequence preseq = new DittedBitSequence();
			preseq.restoreXmlData(parser);
			preSequences.add(preseq);
			el = parser.peek();
		}
		parser.end();
		while (parser.peek().isStart()) {
			parser.start("postpatterns");
			el = parser.peek();
			ArrayList<DittedBitSequence> postdit = new ArrayList<DittedBitSequence>();
			while (el.isStart() && el.getName().equals("data")) {
				DittedBitSequence postseq = new DittedBitSequence();
				postseq.restoreXmlData(parser);
				if (postseq.getNumFixedBits() >= postBitsOfCheck) {
					postdit.add(postseq);
				}
				el = parser.peek();
			}
			ArrayList<PostRule> postRuleArray = new ArrayList<PostRule>();
			ArrayList<MatchAction> matchActionArray = new ArrayList<MatchAction>();
			if (pfactory != null) {
				Pattern.restoreXmlAttributes(postRuleArray, matchActionArray, parser, pfactory);
			}
			PostRule[] postRules = new PostRule[postRuleArray.size()];
			postRuleArray.toArray(postRules);
			MatchAction[] matchActions = new MatchAction[matchActionArray.size()];
			matchActionArray.toArray(matchActions);
			for (DittedBitSequence element : postdit) {
				Pattern postpat = new Pattern(element, 0, postRules, matchActions);
				postPatterns.add(postpat);
			}
			parser.end();	// End postpatterns
		}
		parser.end();   // End patternlist
	}
Restore PatternPairSet from XML pull parser
@param parser XML pull parser
@param pfactory pattern factory user to construct patterns
@throws IOException if pull parsing fails
Ghidra/Features/Base/src/main/java/ghidra/util/bytesearch/PatternPairSet.java