Re: Best way to work with Genbooks
"David \"Judah's Shadow\" Blue" <[email protected]>
| Newsgroups | gmane.comp.literature.sword.devel |
|---|---|
| Message-ID | <7140917.5UtQIUxYns@brooks> |
On Thursday, April 4, 2024 11:17:57 AM EDT you wrote:
> Hi David,
>
> I don't know the classes you are using, but maybe you have to do
> something like this:
>
> if(treeKey->firstChild()) {
> do {
> this->toc += treeKey->getText();
> //Add a space around the new line for the tokenizer to split on
> this->toc += "\n ";
> if(treeKey->hasChildren()) {
> this->walkTree(treeKey);
> }
> }
> while(treeKey->nextSibling());
>
> treeKey->parent();
> }
Yep, changing the while to a do while did the trick. Apparently the while was
skipping the first time
_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page