// The path to the documents directory. String dataDir = Utils.getSharedDataDir(ExtractingAllText.class) + "text\\"; // Load the document into Aspose.Note. Document oneFile = new Document(dataDir + "Sample1.one"); // Retrieve text List textNodes = (List) oneFile.getChildNodes(RichText.class); StringBuilder text = new StringBuilder(); for (RichText richText : textNodes) { text = text.append(richText.getText().toString()); } // Print text on the output screen System.out.println(text);