private void startParagraph(String styleName) throws SAXException {
        if (pDepth == 0) {
            handler.startElement(XHTML, "p", "p", EMPTY_ATTRIBUTES);
            if (styleName != null) {
                currTextStyle = paragraphTextStyleMap.get(styleName);
            }
            hasWrittenStartStyleTags = false;
        } 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