Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in translating XML to JSON - error markup #62

Closed
kganczuk opened this issue Jun 26, 2019 · 2 comments
Closed

Bug in translating XML to JSON - error markup #62

kganczuk opened this issue Jun 26, 2019 · 2 comments

Comments

@kganczuk
Copy link

There is a bug during translating XML to JSON.
itoolkit.js, errorReg constant.
In XML there is a new line sign between markups, I got nulls instead of error code.
Adding new line sign resolves this problem.

Suggesting change this line of code:
const errorReg = /<error>.*?\*\*\* error (.*?)<\/error>.*?<error>(.*?)<\/error>/;
To this:
const errorReg = /<error>.*?\*\*\* error (.*?)<\/error>.*?\n<error>(.*?)<\/error>/;

@abmusse
Copy link
Member

abmusse commented Jun 27, 2019

There a few issues open related to xmlToJson we are currently exploring using xml2js and deprecate using xmlToJson.

Check out PR #53

@kadler
Copy link
Member

kadler commented Jan 13, 2020

We have no plans to enhance or fix XmlToJson and instead plan to drop it in the future. We suggest you use xml2js instead.

@kadler kadler closed this as completed Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants