Description
I found out from ChatGPT that the option attributesGroupName controls whether the simple properties in json are converted to tag attributes or to xml sub-tags. But the description of this option is not understandable and, imho, misleading. There are no examples for this option either.
Input
{
e: {
a: {
f: "bc"
}
}
}
Code
p = require("../fxp.cjs");
xmlBuilder = new p.XMLBuilder({
attributesGroupName: **false**, //THE ISSUE IS ABOUT THIS OPTION
ignoreAttributes: false,
attributeNamePrefix: "",
format: true,
});
console.log(xmlBuilder.build({e:{a: {f: "bc"}}}))
xmlBuilder = new p.XMLBuilder({
attributesGroupName: **true**, //THE ISSUE IS ABOUT THIS OPTION
ignoreAttributes: false,
attributeNamePrefix: "",
format: true,
});
console.log(xmlBuilder.build({e:{a: {f: "bc"}}}))
Output
<e>
<a f="bc"></a>
</e>
<e>
<a>
<f>bc</f>
</a>
</e>
expected data
The output is correct. However, the description of the option attributesGroupName must be much more preciser.
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Description
I found out from ChatGPT that the option
attributesGroupNamecontrols whether the simple properties in json are converted to tag attributes or to xml sub-tags. But the description of this option is not understandable and, imho, misleading. There are no examples for this option either.Input
Code
Output
expected data
The output is correct. However, the description of the option attributesGroupName must be much more preciser.
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.