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)
18 lines
433 B
JavaScript
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
|