metamaps--metamaps/frontend/src/Metamaps/XMLParser.js
Devin Howard b87482cb48 skeleton code to parse XML. Still need:
1) a way to determine this is your team's format of xml
2) an algorithm to convert xml nodes to metamaps objects
3) define interface (maybe just Metamaps.Import.handleXML from javascript console for now)
2017-08-21 08:35:55 -07:00

18 lines
433 B
JavaScript

import parseXML from 'xml-parser'
const XMLParser = {
parseSchema = (text) => {
// see format of data at https://www.npmjs.com/package/xml-parser
const data = parseXML(text)
// TODO algorithm to transform `data` to `returnValue`
// TODO this is the output format, but we still need to fill it in with real data
const returnValue = {
topics: [],
synapses: []
}
}
}
export default XMLParser