@Override
	public void restoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory)
		throws LSHException {
		keys = null;
		List<String> resultKeys = new ArrayList<String>();
		parser.start(name);
		parser.start("tablename");
		tableName = parser.end().getText();
		parser.start("keytype");
		keyType = SpecXmlUtils.decodeInt(parser.end().getText());
		parser.start("valuetype");
		valueType = SpecXmlUtils.decodeInt(parser.end().getText());
		while (parser.peek().isStart()) {
			parser.start();
			String key = parser.end().getText();
			resultKeys.add(key);
		}
		parser.end();
		if (!resultKeys.isEmpty()) {
			keys = new Object[resultKeys.size()];
			resultKeys.toArray(keys);
		}
	}
Query for values from an optional table, given a set of keys
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/QueryOptionalValues.java