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