node-xml icon indicating copy to clipboard operation
node-xml copied to clipboard

ResultS of complicated content are wrong

Open yihchu opened this issue 7 years ago • 1 comments

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/>'

yihchu avatar Mar 16 '18 03:03 yihchu

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' }
  ]}
]}

maxmarkus avatar Feb 24 '20 13:02 maxmarkus