-
Notifications
You must be signed in to change notification settings - Fork 37
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
Change documentation to recommend a different XML parser #344
Comments
Sounds good to me. |
I agree since its not really being maintained we should probably recommend a different parser. Making a note here that we use xml2js in:
|
Should we begin by making pull requests to update the code examples (e.g. pages like this one: https://nodejs-itoolkit.readthedocs.io/en/latest/ProgramCall.html#examples), replacing xml2js with the equivalent usage of fast-xml-parser? |
The iToolkit package.json file includes xml2js as a dependency: Line 44 in c4f5e29
Should we make a PR to add fast-xml-parser to package.json? |
|
|
I was thinking to keep |
Yes adding |
OK I will make an issue for this and tackle it in a follow-up PR Edit: See #350 |
Add fast-xml-parser as an optional dependency now that we recommend it. See #344 (comment)
Is your feature request related to a problem? Please describe.
The migration guide and README implicitly recommend using
xml2js
to parse XML output from itoolkit.xml2js
doesn't appear to be actively maintained and has issues with parsing blank values from non-named keys which we have found to be an issue when getting returned values out of an RPG DS.Describe the solution you'd like
I'd like to open a PR to change the docs to recommend a different XML parser. We have found fast-xml-parser to work quite well in lieu of
xml2js
and, in my opinion, the output JSON object is much cleaner (see below for screenshots).Additional context

From
xml2js
, example output from an RPG DS with a7s0
type with a0
value. Notecharkey
_
exists in this object:Also from

xml2js
, example output from an RPG DS with a15a
type and a""
value. Notecharkey
_
does not exist. This is inconsistent behavior:From

fast-xml-parser
, the same15a
returns a blank value - this is what I expect:The text was updated successfully, but these errors were encountered: