You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you checked the docs for helpful APIs and examples?
Description
When using fast-xml-parser in a browser and loading it as an esm module, when trying to parse an xml file that has a DOCTYPE with an entity in it, the DocTypeReader throws the reference error "entityName is not defined".
This can be recreated simply by adding "use strict"; to the top of the src/xmlparser/DocTypeReader.js file and running the projects unit tests. 5 tests will fail with the exact same error. VS Code will also highlight the problem variables.
The simple fix is to simply add let entityName, val; at line 23 of DocTypeReader.js
const{ XMLParser }=require('fast-xml-parser')constoptions={processEntities: true}// The following line will raise an error if run in strict modeconstresult=newXMLParser(options)
Output
There should be no error and the entity should be processed correctly.
Would you like to work on this issue?
Yes
No
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
The text was updated successfully, but these errors were encountered:
We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.
Description
When using fast-xml-parser in a browser and loading it as an esm module, when trying to parse an xml file that has a DOCTYPE with an entity in it, the DocTypeReader throws the reference error "entityName is not defined".
This can be recreated simply by adding
"use strict";
to the top of the src/xmlparser/DocTypeReader.js file and running the projects unit tests. 5 tests will fail with the exact same error. VS Code will also highlight the problem variables.The simple fix is to simply add
let entityName, val;
at line 23 of DocTypeReader.jsInput
Code
Output
There should be no error and the entity should be processed correctly.
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
The text was updated successfully, but these errors were encountered: