Bogged down with hairy OSIS XML, and want something more lightweight?
Last updated 2 years ago by danbennett .
MIT · Original npm · Tarball · package.json
$ cnpm install osis2json 
SYNC missed versions from official npm registry.


Lightweight Javascript library to convert OSIS Bible XML to JSON


Bogged down with hairy OSIS XML, and want something more lightweight?

This is the library for you!


Sword is the most widely used XML schema for publishing Bibles electronically.

You can read more about it on Wikipedia.

Why osis2json?

Traditionally, applications have interacted with OSIS XML through Sword modules, and the corresponding libraries for parsing those.

There are two official libraries for reading Sword modules: Java and C++. Neither are particularly friendly to newcomers, and lack good documentation.

"Filters" within these libraries can convert XML to HTML. Which is great if you're building an old school, static HTML website, not so great if you're trying to use modern frontend tools like React, Vue, or Angular to build modern web or mobile apps.

osis2json was created as a modern solution for building Bible apps and websites using pure Javascript.

Don't be afraid of Typescript! It compiles down to vanilla Javascript, so you can run it anywhere.

Getting Started

To install in your project:

yarn add osis2json

or, alternatively:

npm install osis2json --save

Check the test cases for a full example of an OSIS XML verse.

It must begin, and end, with the <xml> tag.

const osis2json = require('osis2json');
const verseXML = //JS string
const verseJson = osis2json(verseXML);

Current Tags

  • 0.1.4                                ...           latest (2 years ago)

3 Versions

  • 0.1.4                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |