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

When mergeAttrs=true , How to let children always in array, but attribute not ? #227

Open
finscn opened this issue Aug 24, 2015 · 2 comments

Comments

@finscn
Copy link

finscn commented Aug 24, 2015

When I use :

    var parser = new xml2js.Parser({
        explicitArray: false,
        mergeAttrs: true,
    });

The children are not always in array.

If I set explicitArray=true, the attributes are in array too (I don't want it)

@deltreey
Copy link

I actually encountered this problem also. It's a simple way to separate attributes and elements. Elements are arrays, attributes aren't. I would be happy to submit a pull request to make this possible, but it seems like a breaking change.

@jcsahnwaldt
Copy link
Contributor

Duplicate of #304 and #367.
Also see #110.

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