Convert xml2json to xml2js
GradyD opened this issue · comments
Can we look into converting over to https://www.npmjs.com/package/xml2js?
It removes the dependencies on any C libs and also looks much more robust and active.
Looking through the code it looks like you could get away by simply modifying lines 151 and 153 in ofx.js to something like,
parseString(xml, function (err, result) {
console.dir(result);
});
May have to wrap it in JSON.parse()
but not a huge change.
Thoughts?
I spent time last night switching it over to xml2js. I was able to get it working after I formatted the OFX file as a proper XML file (by hand). Just had to add closing tags.
Not sure how to go about adding closing tags programmatically, yet, but that needs to be resolved in order to remove the C library dependency.
Tested and it works publish with the new 1.0.0
release