ELAN Parser
A simple parsing library for the ELAN NRW XML files. Consumed by the Fruchtfolge model.
Installation
npm install elan-parser
Usage
Standalone usage
const parser = const readFileSync = try const xml = const gml = const data = elan // do something with the data (e.g. store in Database) catch e throw e
In combination with the elan-api
const elanGet = ;const parser = { const xml = await const gml = await return parser}
Testing
Place your testing XML files in the test/data
directory.
Upon first run, uncomment the following line in test/test.js
fs
and comment out the following lines. Inspect the resulting .json
files for correctness, then revert test/test.js
to its original state.
Once the setup has been completed, you can npm test
as always.
Contribution
Contribution is highly appreciated! When submitting a PR, make sure to npm test
.
License
MIT