Description
If an attribute is in a oneListGroup it isn't parsed as an attribute and simply disappear.
Input
const input = {
main: [
{ _attr: { ID: "" } },
{ sub: { _attr: { value: "" } } },
{ sub: { _attr: { value: "" } } }
]
};
Code
const builder = new XMLBuilder({
format: true,
attributesGroupName: '_attr',
attributeNamePrefix: '',
oneListGroup: true,
suppressEmptyNode: true,
suppressBooleanAttributes: false,
ignoreAttributes: false,
});
builder.build(input);
Output
<main>
<sub value=""/>
<sub value=""/>
</main>
expected data
<main ID="">
<sub value=""/>
<sub value=""/>
</main>
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Description
If an attribute is in a oneListGroup it isn't parsed as an attribute and simply disappear.
Input
Code
Output
expected data
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.