Skip to content

Conversation

eric2036
Copy link

@eric2036 eric2036 commented May 4, 2017

For my project i needed tag attribute without any default prefix like "@_" so i have forked this project and modified cli.js to allow no prefix for tag attribute through cli option as "-np" (no prefix) .

Usage before :
$xml2js [-ns|-a|] [-o outputfile.json]

Usage After :
$xml2js [-ns|-a|-np] [-o outputfile.json]

@coveralls
Copy link

coveralls commented May 4, 2017

Coverage Status

Coverage remained the same at 99.54% when pulling 11b801c on eric2036:attr-no-prefix-branch into 5b2c0a3 on NaturalIntelligence:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.54% when pulling 11b801c on eric2036:attr-no-prefix-branch into 5b2c0a3 on NaturalIntelligence:master.

@amitguptagwl
Copy link
Member

@eric2036 Thanks for the changes you suggested and your effort for the implementation. But I'll not be able to merge the changes and publish them because of following reasons;

  1. I dint write the unit tests for CLI feature yet. So I can't check for any bug quickly. However I can't see any bug but there are small changes which are required to be taken care. Eg. console log on "--help" option should be updated.
  2. In my opinion, a CLI argument should be added not to remove the default prefix but to override it. Or default prefix for attribute name, in case of CLI, should be set to blank and some CLI argument should be introduced to set prefix value. (This is a good point to discuss/review)

Unfortunately, I have no machine for next 2 weeks to do any change.

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.

3 participants