Closed arunsraga closed 5 years ago
Hi,
This is not a issue. Query related to use case. Is there any way to add comments using obj instead of root.com('f(x) = x^2');
For ex: let obj = { "@sequence": "1", "@id":"123", "step": [{ "id":1, "name":"step1", "comment":"comment1" }, { "id":2, "name":"step2", "comment2": "comment2" }] }
let xml = builder.create(obj).end({ pretty: true});
In above ex i want to add a dynamic comment text in step array.
Is it possible achieve this.
Yes. Please see: https://github.com/oozcitak/xmlbuilder-js/wiki/Conversion-From-Object#comment-decorator
Thank You @Ozgur Ozcitak. It's working.
Hi,
This is not a issue. Query related to use case. Is there any way to add comments using obj instead of root.com('f(x) = x^2');
For ex: let obj = { "@sequence": "1", "@id":"123", "step": [{ "id":1, "name":"step1", "comment":"comment1" }, { "id":2, "name":"step2", "comment2": "comment2" }] }
let xml = builder.create(obj).end({ pretty: true});
In above ex i want to add a dynamic comment text in step array.
Is it possible achieve this.