fast-xml-parser 5.0.8 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +30 -45
- package/lib/fxp.cjs +1 -207
- package/lib/fxp.d.cts +1 -1
- package/lib/fxp.min.js +1 -1
- package/lib/fxp.min.js.map +1 -1
- package/lib/fxparser.min.js +1 -1
- package/lib/fxparser.min.js.map +1 -1
- package/package.json +2 -1
- package/src/fxp.d.ts +1 -1
- package/src/v6/EntitiesParser.js +2 -2
- package/src/v6/valueParsers/EntitiesParser.js +2 -2
- package/src/xmlparser/OrderedObjParser.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
<small>Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.</small>
|
|
2
2
|
|
|
3
|
+
**5.1.0 / 2025-04-02**
|
|
4
|
+
- feat: declare package as side-effect free (#738) (By [Thomas Bouffard](https://github.com/tbouffard))
|
|
5
|
+
- fix cjs build mode
|
|
6
|
+
- fix builder return type to string
|
|
7
|
+
-
|
|
8
|
+
|
|
9
|
+
**5.0.9 / 2025-03-14**
|
|
10
|
+
- fix: support numeric entities with values over 0xFFFF (#726) (By (Marc Durdin)[https://github.com/mcdurdin])
|
|
11
|
+
- fix: update strnum to fix parsing 0 if skiplike option is used
|
|
12
|
+
|
|
3
13
|
**5.0.8 / 2025-02-27**
|
|
4
14
|
- fix parsing 0 if skiplike option is used.
|
|
5
15
|
- updating strnum dependency
|
package/README.md
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
# [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser)
|
|
2
|
-
[![NPM quality][quality-image]][quality-url]
|
|
3
|
-
[](https://coveralls.io/github/NaturalIntelligence/fast-xml-parser?branch=master)
|
|
4
|
-
[<img src="https://img.shields.io/badge/Try-me-blue.svg?colorA=FFA500&colorB=0000FF" alt="Try me"/>](https://naturalintelligence.github.io/fast-xml-parser/)
|
|
5
|
-
[](https://npm.im/fast-xml-parser)
|
|
6
2
|
|
|
3
|
+
[](https://npm.im/fast-xml-parser)
|
|
7
4
|
|
|
8
5
|
Validate XML, Parse XML to JS Object, or Build XML from JS Object without C/C++ based libraries and no callback.
|
|
9
6
|
|
|
7
|
+
<img align="right" src="static/img/fxp_logo.png" width="180px" alt="FXP logo"/>
|
|
8
|
+
|
|
9
|
+
* Validate XML data syntactically. Use [detailed-xml-validator](https://github.com/NaturalIntelligence/detailed-xml-validator/) to verify business rules.
|
|
10
|
+
* Parse XML to JS Objectand vice versa
|
|
11
|
+
* Common JS, ESM, and browser compatible
|
|
12
|
+
* Faster than any other pure JS implementation.
|
|
13
|
+
|
|
14
|
+
It can handle big files (tested up to 100mb). XML Entities, HTML entities, and DOCTYPE entites are supported. Unpaired tags (Eg `<br>` in HTML), stop nodes (Eg `<script>` in HTML) are supported. It can also preserve Order of tags in JS object
|
|
15
|
+
|
|
10
16
|
---
|
|
17
|
+
# Your Support, Our Motivation
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
## Try out our New Thoughts
|
|
20
|
+
|
|
21
|
+
We've recently launched **Flowgger**
|
|
22
|
+
<a href="https://github.com/solothought/flowgger"> <img src="static/img/flowgger_h.webp" alt="Flowgger Logging Framework" /></a>
|
|
23
|
+
|
|
24
|
+
Don't forget to check our new library [Text2Chart](https://solothought.com/text2chart/flow) that constructs flow chart out of simple text. Very helpful in creating or alayzing an algorithm, and documentation purpose.
|
|
25
|
+
|
|
26
|
+
## Financial Support
|
|
14
27
|
|
|
15
28
|
Sponsor this project
|
|
16
29
|
|
|
@@ -50,9 +63,9 @@ Through OpenCollective
|
|
|
50
63
|
-->
|
|
51
64
|
|
|
52
65
|

|
|
53
|
-
- <a href="https://github.com/cocopon" target="_blank">Hiroki Kokubun</a>
|
|
54
66
|
|
|
55
67
|
> This is a donation. No goods or services are expected in return. Any requests for refunds for those purposes will be rejected.
|
|
68
|
+
|
|
56
69
|
## Users
|
|
57
70
|
|
|
58
71
|
<a href="https://github.com/renovatebot/renovate" title="renovate" ><img src="https://avatars1.githubusercontent.com/u/38656520" width="60px" ></a>
|
|
@@ -79,30 +92,7 @@ Through OpenCollective
|
|
|
79
92
|
|
|
80
93
|
---
|
|
81
94
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<img align="right" src="static/img/fxp_logo.png" width="180px" alt="FXP logo"/>
|
|
85
|
-
|
|
86
|
-
* Validate XML data syntactically
|
|
87
|
-
* Parse XML to JS Object
|
|
88
|
-
* Build XML from JS Object
|
|
89
|
-
* Compatible to node js packages, in browser, and in CLI (click try me button above for demo)
|
|
90
|
-
* Faster than any other pure JS implementation.
|
|
91
|
-
* It can handle big files (tested up to 100mb).
|
|
92
|
-
* Controlled parsing using various options
|
|
93
|
-
* XML Entities, HTML entities, and DOCTYPE entites are supported.
|
|
94
|
-
* unpaired tags (Eg `<br>` in HTML), stop nodes (Eg `<script>` in HTML) are supported.
|
|
95
|
-
* You can restore almost same XML from JSON
|
|
96
|
-
* Supports comments
|
|
97
|
-
* It can preserve Order of tags in JS object
|
|
98
|
-
* You can control if a single tag should be parsed into array.
|
|
99
|
-
* Supports parsing of PI (Processing Instruction) tags with XML declaration tags
|
|
100
|
-
* And many more other features.
|
|
101
|
-
|
|
102
|
-
## v6
|
|
103
|
-
I developed v6 in Apr 2023. And I didn't get the chance to complete all the features. I've ensured that new features don't impact performance. With v6, you have more control on parsing output. Check [docs](./docs/v6) for syntax help and basic understanding.
|
|
104
|
-
|
|
105
|
-
Please leave a comment in discussion forum for your suggestions and if you really need v6.
|
|
95
|
+
# More about this library
|
|
106
96
|
|
|
107
97
|
## How to use
|
|
108
98
|
|
|
@@ -153,7 +143,7 @@ Bundle size
|
|
|
153
143
|
| fxp.min.js | 26K |
|
|
154
144
|
| fxvalidator.min.js | 5.7K |
|
|
155
145
|
|
|
156
|
-
|
|
146
|
+
## Documents
|
|
157
147
|
<table>
|
|
158
148
|
<tr><td>v3</td><td>v4 and v5</td><td>v6</td></tr>
|
|
159
149
|
<tr>
|
|
@@ -179,8 +169,9 @@ Bundle size
|
|
|
179
169
|
</tr>
|
|
180
170
|
</table>
|
|
181
171
|
|
|
182
|
-
**note**:
|
|
183
|
-
Version
|
|
172
|
+
**note**:
|
|
173
|
+
- Version 6 is released with version 4 for experimental use. Based on it's demand, it'll be developed and the features can be different in final release.
|
|
174
|
+
- Version 5 has the same functionalities as version 4.
|
|
184
175
|
|
|
185
176
|
## Performance
|
|
186
177
|
<small>negative means error</small>
|
|
@@ -198,10 +189,9 @@ Version 5 has the same functionalities as version 4.
|
|
|
198
189
|
<img src="./docs/imgs/XMLBuilder_v4.png" width="50%" />
|
|
199
190
|
* Y-axis: requests per second
|
|
200
191
|
|
|
201
|
-
|
|
202
|
-
|
|
203
192
|
<!-- [](https://github.com/NaturalIntelligence/ads/) -->
|
|
204
193
|
|
|
194
|
+
---
|
|
205
195
|
|
|
206
196
|
## Usage Trend
|
|
207
197
|
|
|
@@ -211,20 +201,15 @@ Version 5 has the same functionalities as version 4.
|
|
|
211
201
|
<img src="https://npm-compare.com/img/npm-trend/THREE_YEARS/fast-xml-parser.png" width="50%" alt="NPM Usage Trend of fast-xml-parser" />
|
|
212
202
|
</a>
|
|
213
203
|
|
|
214
|
-
|
|
215
|
-
|
|
204
|
+
# Supporters
|
|
205
|
+
#### Contributors
|
|
216
206
|
|
|
217
207
|
This project exists thanks to [all](graphs/contributors) the people who contribute. [[Contribute](docs/CONTRIBUTING.md)].
|
|
218
|
-
<!-- <a href="graphs/contributors"><img src="https://opencollective.com/fast-xml-parser/contributors.svg?width=890&button=false" /></a> -->
|
|
219
|
-
<!--
|
|
220
|
-
### Lead Maintainers
|
|
221
|
-

|
|
222
|
-
[](https://github.com/Delagen)
|
|
223
208
|
|
|
224
|
-
### All Contributors -->
|
|
225
209
|
<a href="graphs/contributors"><img src="https://opencollective.com/fast-xml-parser/contributors.svg?width=890&button=false" /></a>
|
|
226
210
|
|
|
227
|
-
|
|
211
|
+
|
|
212
|
+
#### Backers from Open collective
|
|
228
213
|
|
|
229
214
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/fast-xml-parser#backer)]
|
|
230
215
|
|