Aspose Update - Some question about changed methods

Hello everyone,
Currently I am trying to update the aspose.Words for Java library for a project that is still using the 17.4 version.
There are some compile errors and deprecated warnings now of course but I managed to solve the most important ones. But there are two methods I have questions about:

A: com.aspose.words.CompositeNode.getChildNodes()
This method is now completely missing in the latest version.
In the docs I saw that there is now another/new version of this method:
com.aspose.words.CompositeNode.getChildNodes(int nodeType, boolean isDeep )

What was the behaviour of the old method without parameters? My guess is it fetched every child node recursively, but I just wanted to be sure.
I replaced it with getChildNodes(NodeType.ANY,true). This should do the same as the old one without parameters, right?

B: com.aspose.words.Range.replace(java.util.regex.Pattern, com.aspose.words.IReplacingCallback, boolean)

This method is also missing in the latest version. I am not sure what it was supposed to do because I see no replacement string here. In our project we also don’t use it for replacement but only for search. So can somebody give some insights of what this old replace method’s purpose was and what this boolean parameter did?
I will probably have to rewrite the code section on our side but I don’t want to miss some hidden functionalities.
Thanks in advance and have a nice day!


A. CompositeNode.getChildNodes(NodeType.ANY, false) is an exact replacement of CompositeNode.getChildNodes() property.

B. You should use FindReplaceOptions.setReplacingCallback to specify IReplacingCallback.

Boolean parameter specifies search direction. Now you can use FindReplaceOptions.Direction property.

1 Like