Comments (7)
which version are you trying?
from fast-xml-parser.
i'm using version 3.3.6.
the only one for/in loop in j2x.js, is writed like
for (const v in cdata) {}
it might not work properly in older version of browser.
from fast-xml-parser.
Please always fill the issue template while raising an issue. It avoids long communication and helps to understand and resolve problem fast.
I've checked the bundle file. And I can't find any occurrence of const. Can you please tell me the following
- Have you tried to run the demo in the browser where you are facing the issue?
- Are you using the browser library from cdn or from git repository?
What I can see in the code is
for (var v in cdata) {
//come code
}
from fast-xml-parser.
I'm using yarn for my pkg manager.
I use the version(3.3.6) in my project, and it is failed to run in firefox45.
for (const v in cdata) {
// some code
}
above code was found in the j2x.js file in main branch, which is what I'm using.
while below code you see, which may be found in the dev branch, and 'var' is used instead.
for (var v in cdata) {
// some code
}
from fast-xml-parser.
What I can understand from your comment, you are using FXP in your node package. Then you're building browser bundle. If yes then you should use browser bundler which can transform ES6 syntax to ES5. If no then you should use js file from lib of FXP github repository, or from cdn.
You should try running demo first in browser which use js file from lib folder of FXP github repo. (as I asked in previous comment)
The code I referred is from master branch of FXP.
from fast-xml-parser.
If that, change the main file in package.json to lib folder will be good for all user. if someone uses it to build for browser, usually node modules will not be processed.
from fast-xml-parser.
I'm not sure if it is the right approach. As we did it for some build in past but then reverted back. However I've done a small change. So please try 3.3.7.
from fast-xml-parser.
Related Issues (20)
- Wrong behaviour with "arrayNodeName" and "oneListGroup" from XMLBuilder HOT 2
- Validation of invalid XML declarations HOT 6
- Validation of multiple root elements
- Parsing an invalid XML element
- isArray behavior on missing/empty tags HOT 1
- TypeError: Cannot read properties of undefined (reading 'tagName') when parsing closing tag without an opening tag at the start of XML document HOT 3
- V3 to V4 migration guide? HOT 5
- Circular Dependency Error While trying to validate xml HOT 3
- Online demo does not handle DOCTYPE correctly and gives an error HOT 2
- Regex Injection Via Doctype Entities HOT 4
- unreliable for parsing html HOT 2
- Introduce isObject option for unpaired tags HOT 2
- Parsing of Empty Tags HOT 4
- Entities are being processed in CDATA sections HOT 1
- Attribute in oneListGroup is not parsed correctly HOT 1
- All special characters are not correctly parsed HOT 4
- Ability to read & write DOCTYPE information HOT 2
- parser malfunctions when textNodeName is the same as a tag name HOT 8
- Node attributes get lost on XML parsing HOT 1
- Decimal point is not preserved after parsed to json. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-xml-parser.