@Override
    public void startDocument() throws SAXException {
        super.startDocument();

        delegate.startDocument();

        inHeader = true;
        inFooter = false;
        headerCharOffset = 0;

        if (includeMarkup) {
            elements = new ArrayList<>();
        }
    }
Retrieves the built TextDocument

@return TextDocument
tika-handlers/tika-handler-boilerpipe/src/main/java/org/apache/tika/sax/boilerpipe/BoilerpipeContentHandler.java