@Override
    public void endElement(String uri, String localName, String qName) throws SAXException {

        if ("tu".equals(localName)) {
            xhtml.endElement("div");
        }

        if ("tuv".equals(localName)) {
            xhtml.endElement("p");
        }

        if ("seg".equals(localName)) {
            inSegment = false;
        }
    }
Content Handler for Translation Memory eXchange (TMX) files.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-xml-module/src/main/java/org/apache/tika/parser/tmx/TMXContentHandler.java