This method of the Document class retrieves the document text.
public String getText();
Returns a plain text (that is, not marked-up) representation of the entire document.
getText() in ElementImpl.