dylang / dylang/node-xml

Multiple mixed content being ignored

Open
#36 3 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
283
Forks
50
PR merge metrics
No merged PRs in 30d

Description

The following is modified example from the readme:

```js
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

```xml


Transformers
GI Joe

```

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

```js
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:

```xml

Transformers and the A-team

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.