Closed keithmo closed 11 years ago
Hiya,
I think this might be fixed in the latest version. I changed the data2xml() to expect '@' and '#'.
Can you try it out and let me know how it goes. I guess we each chose the other way to fix it ... but I hope that works for you.
It's been pushed to NPM as v1.1.1.
Cheers, Andy
I'll be out-of-town all day today, but I'll test this tomorrow (Thursday). Thanks!
FYI: Fix confirmed. Thanks!
That's great news! Many thanks for re-testing. :)
The xml2js parser, as invoked by awssum, stores XML attributes in a JSON element named '@'.
The xml generator, on the other hand, assumes XML attributes are in a JSON element named '_attr'.
One side effect of this: You cannot retrieve an ACL via GetObjectAcl() then immediately write it via PutObjectAcl().
FWIW, xml2js does support an 'attrkey' option when creating the Parser object. As an experiment, I set this in awssum when creating the top-level parser, and the results of GetObjectAcl() can now be passed to PutObjectAcl(). I don't expect this to be a real solution, just an experiment.