I am using aspose-words-18.6-jdk16.jar (JAVA)
We are using this jar to extract file contents as string using the following APIs:
Document doc = new Document(“file_path”);
String textContent = doc.toString(SaveFormat.TEXT);
For the attached file smartdoc.xml , we only get following text with no XML tags
testing content of document
In this case, the problem is that title tag’s contents like “amphibians” is missing in textContent output.
For file busdoc.xml, the whole of xml content with tags is returned in textContent like