-
-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
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?
Description
Getting an exception in the specified scenario.
Input
<a>
<b><![CDATA[']]></b>
<b>'</b>
</a>Code
const XMLParser = require('fast-xml-parser').XMLParser;
const parser = new XMLParser({ stopNodes: ["*.b"] });
console.dir(parser.parse("<a><b><![CDATA[']]></b><b>'</b></a>"));Output
node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js:299
if(!result) throw new Error(`Unexpected end of ${tagName}`);
^
Error: Unexpected end of b
at OrderedObjParser.parseXml (node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js:299:31)
at XMLParser.parse (node_modules/fast-xml-parser/src/xmlparser/XMLParser.js:35:48)
expected data
{ a: { b: [ "'", "'" ] } }
Would you like to work on this issue?
- Yes
- No
Reactions are currently unavailable
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