Issue in reading content between the bookmark(ASPOSE.WORDS for JAVA)

We have to read the content between two bookmarks, namely webpubOverview1 and webpubOverview2. The two bookmarks does not belong to the same parent node. So we are not able to parse through the nodes between webpubOverview1 and webpubOverview2 and read the content. The following is the piece of code we tried

Bookmark bookmarkStart = bookmarkColl.get("webpubOverview1");
Bookmark bookmarkEnd = bookmarkColl.get("webpubOverview2.");
Node childNode = startBookmark.getBookmarkEnd();
Node endNode = endBookmark.getBookmarkStart();
while (childNode != null && childNode != endNode)
{
    if (childNode is composite)
    {
        //parse though child nodes and read content
    }
    else
        childNode.getText();
    childNode = startNode.getNextSibling();
}

Regards
Deepak

Hi

Thanks for your request. I think you can find an answer in the following thread:
https://forum.aspose.com/t/101379
Please let me know in case of any issues, I will be glad to help you.
Best regards.