Hi Loren,
There should be examples you can find under the examples/ folder in the source
which output plain text, but there are 2 general ways to do this in SWORD:
1)
SWMgr library;
SWModule *kjv = library.getModule("KJV");
kjv->setKey("jn.3.16");
cout << kjv->stripText() << endl;
(see example:
https://crosswire.org/svn/sword/trunk/examples/classes/simplechapter.cpp )
2) preferred:
SWMgr library(new MarkupFilterMgr(FMT_PLAIN));
SWModule *kjv = library.getModule("KJV");
kjv->setKey("jn.3.16");
cout << kjv->renderText() << endl;
(See example
https://crosswire.org/svn/sword/trunk/examples/cmdline/outrender.cpp )
Hope this helps.
Welcome!
Troy
On November 14, 2020 8:35:06 PM MST, Loren Burkholder
<computersemiexp...@outlook.com> wrote:
>I'm trying to get the plain text for a verse from the KJV module, but I
>can't figure out how to remove the Strong's references. I've tried
>adding a sword::GBFPlain and sword::GBFStrongs as a strip filter to my
>KJV module, but it only strips out the beginning of the <w> element,
>leaving me with stuff like:
>
>> salvm="strong:H072255">In the beginning
>
>as my output, instead of taking out the whole <w
>salvm="strong:H072255"> tag. What should I be doing to get rid of all
>this?
>
>Thanks in advance.
>Loren Burkholder
>
>
>_______________________________________________
>sword-devel mailing list: sword-devel@crosswire.org
>http://crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page