TextExtractor provides a method to get the display text of a single element. EditableTextExtractor is a sub class of TextExtractor. It provides a method to return all the text that the user can typically edit in a document, including text in cotent.xml, header and footer in styles.xml, meta data in meta.xml.
The following codes use EditableTextExtractor as an example, the text of the document "textExtractor.odt" is extracted for user. For TextExtractor, it can't extract the text from a TextDocument.