Closed javierugarte closed 5 years ago
When I try to use the property length in complex use, It don't create the xml correctly.
length
Error:
already contains an attribute with the name "length"
It is because, when using an array / object, the length property already exists.
Escape this word? Replace and then back again?
Example:
var example2 = function() { var obj = { "name": "John", "phone": [ { "@": { "length": "home" }, "#": "123-555-4567" } ], "email": "john@smith.com" }; console.log(js2xmlparser.parse("person", obj)); console.log(); }; example2();
Regards
This was a bug in xmlcreate which is now fixed. If you run npm update you should pick up the new version and the problem should be fixed.
npm update
When I try to use the property
length
in complex use, It don't create the xml correctly.Error:
It is because, when using an array / object, the length property already exists.
Escape this word? Replace and then back again?
Example:
Regards