public void readWeights(XmlPullParser parser) throws SAXException {
		weightFactory = new WeightFactory();		// Allocate new weight factory we will read into
		idfLookup = new IDFLookup();				// Allocate new IDF object we will read into
		boolean foundweights = false;
		boolean foundlookup = false;
		XmlElement el = parser.start();
		settings = Integer.decode(el.getAttribute("settings"));
		el = parser.peek();	// The <weightfactory> and <idflookup> tags must be at the second level of the xml
		while(el.isStart()) {
			if (el.getName().equals("weightfactory")) {
				weightFactory.restoreXml(parser);
				foundweights = true;
			}
			else if (el.getName().equals("idflookup")) {
				idfLookup.restoreXml(parser);
				foundlookup = true;
			}
			else {
				parser.discardSubTree();
			}
			el = parser.peek();
		}
		if (!foundweights) {
			throw new SAXException("Could not find <weightfactory> tag in configuration");
		}
		if (!foundlookup) {
			throw new SAXException("Could not find <idflookup> tag in configuration");
		}
	}
Read both the weights and the lookup hashes from an XML stream
@param parser is the XML parser
@throws SAXException
Ghidra/Framework/Generic/src/main/java/generic/lsh/vector/LSHVectorFactory.java