@Override
        public void endDocument() throws SAXException {
            try {
                JsonMetadata.setPrettyPrinting(prettyPrint);
                JsonMetadata.toJson(metadata, writer);
                writer.flush();
            } catch (IOException e) {
                throw new SAXException(e);
            }
        }
Outputs the Tika metadata as XMP using the Tika XMP module
tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java