-
-
Notifications
You must be signed in to change notification settings - Fork 329
Open
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation
Description
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
- Have you checked the docs for helpful APIs and examples?
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?
- Yes
- No
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
NiklasPor and thebrownfox
Metadata
Metadata
Assignees
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation