-
-
Notifications
You must be signed in to change notification settings - Fork 355
Closed
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?
Description
Using preserveOrder: true on a self-closing stopNode results in the tag emitted as a text node.
Code
const XMLParser = require('fast-xml-parser').XMLParser;
const parser = new XMLParser({preserveOrder: true, stopNodes: ["*.foo"]});
console.dir(parser.parse('<root><foo name="bar"/></root>'), { depth: null });Output
[
{
root: [ { foo: [ { '#text': '' } ] }, { '#text': 'foo name="bar"/>' } ]
}
]Expected Output
[
{
root: [
{ foo: [ { '#text': '' } ] }
]
}
]Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels