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
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?
- YesNo
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
fix NaturalIntelligence#472: stopNode can have any special tag inside