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

Multiple mixed content being ignored #36

Open
Nokel81 opened this issue Jun 27, 2017 · 3 comments
Open

Multiple mixed content being ignored #36

Nokel81 opened this issue Jun 27, 2017 · 3 comments

Comments

@Nokel81
Copy link

Nokel81 commented Jun 27, 2017

The following is modified example from the readme:

var example5 = [{
    toys: [{
            _attr: {
                decade: '80s',
                locale: 'US'
            }
        },
        {
            toy: [{
                    _attr: {
                        decade: '80s',
                        locale: 'US'
                    }
                },
                'Transformers',
                {
                    toya: [{
                        _attr: {
                            knowing: 'half the battle'
                        }
                    }, 'GI Joe']
                }
            ]
        }
    ]
}];

And it produces

<toys decade="80s" locale="US">
    <toy decade="80s" locale="US">
        Transformers
        <toya knowing="half the battle">GI Joe</toya>
    </toy>
</toys>

However, if another piece of mixed data is added like this:

var example5 = [{
    toys: [{
            _attr: {
                decade: '80s',
                locale: 'US'
            }
        },
        {
            toy: [{
                    _attr: {
                        decade: '80s',
                        locale: 'US'
                    }
                },
                'Transformers',
                {
                    toya: [{
                        _attr: {
                            knowing: 'half the battle'
                        }
                    }, 'GI Joe']
                },
                ' and the A-team'
            ]
        }
    ]
}];

The sub object is just ignored and the following is outputted:

<toys decade="80s" locale="US">
    <toy decade="80s" locale="US">Transformers and the A-team</toy>
</toys>
@vincentjames501
Copy link

+1

@smmoosavi
Copy link

any update?

@Nokel81
Copy link
Author

Nokel81 commented Feb 23, 2018

I should have a PR soon

Nokel81 pushed a commit to Nokel81/node-xml that referenced this issue Feb 23, 2018
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