public static DocumentBuilder getDocumentBuilder(ParseContext context) throws TikaException {
        DocumentBuilder documentBuilder = context.get(DocumentBuilder.class);
        if (documentBuilder != null) {
            return documentBuilder;
        } else {
            return XMLReaderUtils.getDocumentBuilder();
        }
    }
Returns the DOM builder specified in this parsing context.
If a builder is not explicitly specified, then a builder
instance is created and returned. The builder instance is
configured to apply an {@link XMLReaderUtils#IGNORING_SAX_ENTITY_RESOLVER},
and it sets the ErrorHandler to <code>null</code>.
Consider using {@link XMLReaderUtils#buildDOM(InputStream, ParseContext)}
instead for more efficient reuse of document builders.

@return DOM Builder
tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java