Closed soldair closed 11 years ago
Example:
var values = { name: 'bar', attrs:{mood:'sad'}, children: { foo: 'bar' } };
jsontoxml(values);
have you tried?
var j = require('./jsontoxml');
console.log(j([{attrs:{a:"b"},name:"b"}]))
this works for me.
nodelists must be arrays of nodes because thats just how xml is
values = [
{name: 'bar', attrs:{mood:'sad'}, children: {foo: 'bar'}}
];
im happy to help. close the issue if you feel it's resolved =)
Thanks! Yes, this totally resolves my issue - not a bug on your end. A bug in my brian.
Are you aware that you cannot add attributes to a top level xml tag in your library?
Example:
Thanks,
Alexander Scott Baron