[sword-devel] XML versions of Thayer's or Strongs?

DM Smith dmsmith555 at yahoo.com
Thu Mar 9 22:22:10 MST 2006


Sean wrote:
> Are there XML versions of Thayer's or Strongs modules that already 
> exist or can be automatically derived? mod2osis with StrongsGreek 
> doesn't work because it's not a verse keyed module. mod2imp produces 
> plain text in a structured format, but i'm hoping there's an easier 
> way than writing a converter from imp to XML. Any suggestions? 

You can use jsword to extract a module (that jsword supports) to osis.
You will need the the jsword jars (www.crosswire.org/jsword/download.jsp)
and you will need to write a small piece of java based upon
org.crosswire.jsword.examples.ApiExamples.java
You can find it here: 
http://www.crosswire.org/svn/jsword/trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
It will look something like:

Book dict = Books.installed().getBook("StrongsGreek");
Key keys = dict.getGlobalKeyList();
Iterator iter = keys.iterator();
while (iter.hasNext())
{
   Key key = (Key) iter.next();
   BookData bdata = dict.getData(key);
   SAXEventProvider osissep = bdata.getSAXEventProvider();
   System.out.println(XMLUtil.writeToString(osissep));
}


Each key will produce a fragment of xml that at least pretends to be OSIS.






More information about the sword-devel mailing list