We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can extractContent be built into docBuilder?

Hello. We use Aspose for Java in a PHP environment using JavaBridge. As such, we can’t readily compile and deploy new classes in Java to work with Aspose. The extractContent() method is often given in Aspose documentation as a way to find and extract text between two nodes in a document - for example, between bookmark start and end nodes.

Is there any way extractContent could be built into DocumentBuilder or another class that’s readily available via the existing jar files?

If not, is there a straightforward way using Aspose classes to get all nodes in order between a BookmartStart and a BookmarkEnd? We need to extract the toString(HTML) of each node between the two.

Thank you!

@backprop Thank you for your suggestion, I have create a feature request WORDSNET-23595. We will consider including ExtractContent method as built-in method in Aspose.Words API.
Currently, to extract content between nodes, you have to traverse the Document object tree as shown in our code examples.
We will keep you informed and let you know our decision regarding adding a built in method for extracting content between nodes.

1 Like