You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
245 B
14 lines
245 B
import xml2js from '../xml2js.js';
|
|
|
|
function xml2Json(xml) {
|
|
let json;
|
|
xml2js.parseString(xml, { async: false }, (err, result) => {
|
|
if (err) {
|
|
throw err;
|
|
}
|
|
json = result;
|
|
});
|
|
return json;
|
|
}
|
|
|
|
global.xml2Json = xml2Json;
|