private Tuple3<Vocabulary, SerializerVocabulary, ParserVocabulary> buildVocab(
            final String xml,
            final SerializerVocabulary serializerVocabulary,
            final ParserVocabulary parserVocabulary)
            throws ParserConfigurationException, SAXException, IOException {

        final SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
        final SAXParser saxParser = factory.newSAXParser();

        final InputStream inputStream = new ByteArrayInputStream(xml.getBytes());

        SerializerVocabulary serializerVocabularyLocal = null;
        ParserVocabulary parserVocabularyLocal = null;

        final VocabularyGenerator vocabularyGenerator;
        if (serializerVocabulary != null) {
            serializerVocabularyLocal = serializerVocabulary;
            parserVocabularyLocal = parserVocabulary;
        } else {
            serializerVocabularyLocal = new SerializerVocabulary();
            parserVocabularyLocal = new ParserVocabulary();
        }
//        vocabularyGenerator = new VocabularyGenerator(serializerVocabularyLocal, parserVocabularyLocal);

        vocabularyGenerator = new NoCharsVocabularyGenerator(serializerVocabularyLocal, parserVocabularyLocal);
        LOGGER.info(LogUtil.inSeparatorLine("Generating vocab"));
        saxParser.parse(inputStream, vocabularyGenerator);

        return Tuple.of(vocabularyGenerator.getVocabulary(), serializerVocabularyLocal, parserVocabularyLocal);
    }
A proof of concept for https://github.com/gchq/stroom/issues/1945
Trying to prove that we can generate a fast infoset vocab
for some xml and then append to it. This is to reduce the volume of data
stored in the LMDB ref data store.
stroom-pipeline/src/test/java/stroom/pipeline/refdata/TestFastInfosetVocab.java