locize / xliff

xliff2js and js2xliff converter xliff utils
MIT License
80 stars 37 forks source link

XLIFF to JS conversion error { Error: Text data outside of root node. #17

Closed matt212 closed 5 years ago

matt212 commented 6 years ago

Hi @adrai ,

I am able to create successfully XLIFF files using xliff/js2xliff and it worked as expected. now i wanted to convert same XLIFF to js using xliff/xliff2js . but i am getting below error

yarn import

code `xliff2js('./1537854025565.xml', (err, res) => { if (err) { console.log(err) } console.log(res) })

` Please note the XLIFF generated is valid . Should i read XLIFF first to string and then pass it on xliff2js fuction ?

adrai commented 6 years ago

exactly, like in the readme 😜