Description
When I use both options together, then the attributeGroup gets wrapped by an extra object with the key specified by attributesGroupName.
Code
const parser = new XMLParser({
attributesGroupName: ':@',
preserveOrder: true,
ignoreAttributes: false,
});
const parsed = parser.parse('<root xmlns:ex="http://example.com"><p test="foo"></p></root>');
console.log(parsed);
Output
[
{
root: [
p: [],
':@': {
':@': {
'@_test': 'foo',
},
},
],
':@': {
':@': {
'@_xmlns:ex': 'http://example.com',
},
},
},
]
expected data
[
{
root: [
p: [],
':@': {
'@_test': 'foo',
},
],
':@': {
'@_xmlns:ex': 'http://example.com',
},
},
]
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Description
When I use both options together, then the
attributeGroupgets wrapped by an extra object with the key specified byattributesGroupName.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.