private void endParagraph() throws SAXException {
        closeStyleTags();
        if (pDepth == 1) {
            handler.endElement(XHTML, "p", "p");
        } else {
            handler.characters(SPACE, 0, SPACE.length);
        }
        pDepth--;

    }
Check if a node is a text node
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/odf/OpenDocumentBodyHandler.java