node-xml
node-xml copied to clipboard
ResultS of complicated content are wrong
I ran this,
let example3 = { annotation: {xxx: '1111', arr: [ { toy: 'Transformers' } , { toy: 'GI Joe' }, { toy: 'He-man' } ]} }; let result1 = xml(example3, {indent: '\t'})
and the result1 was: '<annotation/>'
Long time ago, but in case someone passes by. You're just using it wrong, written properly it works:
{ annotation: [
{xxx: '1111'},
{arr: [
{ toy: 'Transformers' },
{ toy: 'GI Joe' },
{ toy: 'He-man' }
]}
]}