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

Fix #12: add xml2js options #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

foobar98
Copy link

@foobar98 foobar98 commented Nov 5, 2022

Fixes #12

As part of the parse options, consumers can now pass xml2js options in the object which was previously hardcoded.

options: {
  filePath: ..,
  xmlContent: ..,
  xmlOptions: ..
}

If not provided, it will default to -

var XML2JS_OPTS = {
  trim: true,
  normalizeTags: true,
  normalize: true,
  mergeAttrs: true
};

Signed-off-by: pgupta19 [email protected]

Signed-off-by: pgupta19 <[email protected]>
@foobar98 foobar98 changed the title feat: add xml2js options Fix #12: add xml2js options Nov 5, 2022
Copy link
Collaborator

@nsinghal12 nsinghal12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please add relevant tests to ensure that the parsing options are being honored.

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

Successfully merging this pull request may close these issues.

not able to pass parser options
2 participants