Skip to content

Commit 2360468

Browse files
authored
Merge branch 'NaturalIntelligence:master' into master
2 parents 77f8aa3 + b8e40c8 commit 2360468

22 files changed

+174
-66
lines changed

.github/ISSUE_TEMPLATE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<!-- If you are raising a **bug** please ensure to fill below checklist; -->
1010
### Checklist
1111
<!-- choose one by changing [ ] to [x] -->
12-
* [ ] Have you asked your question on Stackoverflow or similar forum?
13-
* [ ] Are you running the latest version?
12+
* [ ] Have you asked your question on Stackoverflow or similar forum? You may get better support and opinion.
13+
* [ ] What version of the library you're using?
1414
* [ ] Have you included sample input, output, error, and expected output?
15-
* [ ] Have you checked if you are using correct configuration?
16-
* [ ] Did you try online [tool](https://naturalintelligence.github.io/fast-xml-parser/)?
15+
* [ ] Have you checked if you are using correct configuration? Please check README to find documentation.
16+
* [ ] Did you try online [tool](https://naturalintelligence.github.io/fast-xml-parser/)? It has limited features still helpful.
1717

1818
<!-- Please provide following data to avoid long communication and fast resolution. -->
1919
### Input

.github/workflows/node.js.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [10.x, 12.x, 14.x]
18+
node-version: [10.x, 12.x, 14.x, 16.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
22

3+
**4.4.0 / 2024-05-18**
4+
* fix #654: parse attribute list correctly for self closing stop node.
5+
* fix: validator bug when closing tag is not opened. (#647) (By [Ryosuke Fukatani](https://github.com/RyosukeFukatani))
6+
* fix #581: typings; return type of `tagValueProcessor` & `attributeValueProcessor` (#582) (By [monholm]())
7+
38
**4.3.6 / 2024-03-16**
49
* Add support for parsing HTML numeric entities (#645) (By [Jonas Schade ](https://github.com/DerZade))
510

README.md

+70-42
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
# [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser)
2-
[![Known Vulnerabilities](https://snyk.io/test/github/naturalintelligence/fast-xml-parser/badge.svg)](https://snyk.io/test/github/naturalintelligence/fast-xml-parser)
32
[![NPM quality][quality-image]][quality-url]
43
[![Coverage Status](https://coveralls.io/repos/github/NaturalIntelligence/fast-xml-parser/badge.svg?branch=master)](https://coveralls.io/github/NaturalIntelligence/fast-xml-parser?branch=master)
54
[<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/)
65
[![NPM total downloads](https://img.shields.io/npm/dt/fast-xml-parser.svg)](https://npm.im/fast-xml-parser)
76

8-
[quality-image]: http://npm.packagequality.com/shield/fast-xml-parser.svg?style=flat-square
9-
[quality-url]: http://packagequality.com/#?package=fast-xml-parser
10-
117

128
Validate XML, Parse XML to JS Object, or Build XML from JS Object without C/C++ based libraries and no callback.
139

14-
> XML Parser v5 is added for experimental use
15-
> https://solothought.com
10+
---
11+
12+
<a href="https://www.amazon.in/Power-Glasses-world-imagination-Perspective-ebook/dp/B0CW1CJGNK/"><img align="left" src="https://github.com/NaturalIntelligence/fast-xml-parser/assets/7692328/e7a42bcc-5186-45e3-bfee-de8d8b9a69d4" alt="ads-thePowerGlassesBook"/></a>
13+
I had recently published a book, The Power Glasses. Please have a look. Your feedback would be helpful. You can [mail]([email protected]) me for a free copy.
14+
<br>
15+
16+
Sponsor this project
1617

17-
Sponsor this project 👉
1818
<a href="https://github.com/sponsors/NaturalIntelligence">
19-
<img src="https://raw.githubusercontent.com/NaturalIntelligence/ThankYouBackers/main/github_sponsor.png" width="200" />
19+
<img src="https://raw.githubusercontent.com/NaturalIntelligence/ThankYouBackers/main/github_sponsor.png" width="180" />
2020
</a>
2121
<a href="https://opencollective.com/fast-xml-parser/donate" target="_blank">
22-
<img src="https://opencollective.com/fast-xml-parser/donate/[email protected]?color=blue" width=200 />
22+
<img src="https://opencollective.com/fast-xml-parser/donate/[email protected]?color=blue" width=180 />
2323
</a>
24-
<a href="https://paypal.me/naturalintelligence"> <img src="static/img/support_paypal.svg" alt="Stubmatic donate button" width="200"/></a>
25-
24+
<a href="https://paypal.me/naturalintelligence"> <img src="static/img/support_paypal.svg" alt="Stubmatic donate button" width="180"/></a>
25+
<br>
26+
<br>
27+
<br>
2628

29+
<!--
2730
### Current Sponsors
2831
2932
Check the complete list at [ThankYouBackers](https://github.com/NaturalIntelligence/ThankYouBackers) for our sponsors and supporters.
@@ -45,7 +48,9 @@ Through OpenCollective
4548
<a href="https://opencollective.com/fast-xml-parser/sponsor/7/website" target="_blank"><img src="https://opencollective.com/fast-xml-parser/sponsor/7/avatar.svg"></a>
4649
<a href="https://opencollective.com/fast-xml-parser/sponsor/8/website" target="_blank"><img src="https://opencollective.com/fast-xml-parser/sponsor/8/avatar.svg"></a>
4750
<a href="https://opencollective.com/fast-xml-parser/sponsor/9/website" target="_blank"><img src="https://opencollective.com/fast-xml-parser/sponsor/9/avatar.svg"></a>
51+
-->
4852

53+
![fxp_sponsors](https://github.com/NaturalIntelligence/fast-xml-parser/assets/7692328/c9367497-d67e-410a-90a6-66e3808be929)
4954

5055
## Users
5156

@@ -63,14 +68,15 @@ Through OpenCollective
6368
<a href="https://github.com/SAP" title="SAP" > <img src="https://user-images.githubusercontent.com/7692328/204835214-d9d25b58-e3df-408d-87a3-c7d36b578ee4.png" width="60px" ></a>
6469
<a href="https://github.com/postmanlabs" title="postman" > <img src="https://user-images.githubusercontent.com/7692328/204835529-e9e290ad-696a-49ad-9d34-08e955704715.png" width="60px" ></a>
6570
<a href="https://github.com/react-native-community" title="React Native Community" > <img src="https://avatars.githubusercontent.com/u/20269980?v=4" width="60px" ></a>
71+
<a href="https://github.com/googleapis" title="Google APIs" > <img src="https://avatars.githubusercontent.com/u/16785467?v=4" width="60px" ></a>
72+
<a href="https://github.com/langchain-ai" title="Langchain AI" > <img src="https://avatars.githubusercontent.com/u/126733545?v=4" width="60px" ></a>
73+
<a href="https://github.com/withastro" title="Astro websie builder" > <img src="https://avatars.githubusercontent.com/u/44914786?v=4" width="60px" ></a>
74+
<a href="https://github.com/baidu" title="Baidu" > <img src="https://avatars.githubusercontent.com/u/13245940?v=4" width="60px" ></a>
75+
[more](./USERs.md)
6676

67-
Check the bigger [list](./USERs.md)
68-
69-
<small>The list of users is collected either from the list published by Github, communicated directly through mails/chat , or from other resources. If you feel that your name in the above list is incorrectly published or you're not the user of this library anymore then you can inform us to remove it. We'll do the necessary changes ASAP.</small>
77+
<small>The list of users are mostly published by Github or communicated directly. Feel free to contact if you find any information wrong.</small>
7078

71-
If you want to be an anonymous user of this application and don't want to be highlighted anywhere then you can contact me at
72-
73-
- https://linkedin.com/in/amitguptagwl/
79+
---
7480

7581
## Main Features
7682

@@ -79,7 +85,7 @@ If you want to be an anonymous user of this application and don't want to be hig
7985
* Validate XML data syntactically
8086
* Parse XML to JS Object
8187
* Build XML from JS Object
82-
* Works with node packages, in browser, and in CLI (press try me button above for demo)
88+
* Compatible to node js packages, in browser, and in CLI (click try me button above for demo)
8389
* Faster than any other pure JS implementation.
8490
* It can handle big files (tested up to 100mb).
8591
* Controlled parsing using various options
@@ -137,49 +143,71 @@ In a HTML page
137143
</script>
138144
```
139145

140-
Check lib folder for different browser bundles
146+
Bundle size
141147

142148
| Bundle Name | Size |
143149
| ------------------ | ---- |
144-
| fxbuilder.min.js | 5.2K |
145-
| fxparser.js | 50K |
146-
| fxparser.min.js | 17K |
147-
| fxp.min.js | 22K |
150+
| fxbuilder.min.js | 6.5K |
151+
| fxparser.min.js | 20K |
152+
| fxp.min.js | 26K |
148153
| fxvalidator.min.js | 5.7K |
149154

150155
### Documents
151-
**v3**
152-
* [documents](./docs/v3/docs.md)
153-
154-
**v4**
155-
1. [GettingStarted.md](./docs/v4/1.GettingStarted.md)
156-
2. [XML Parser](./docs/v4/2.XMLparseOptions.md)
157-
3. [XML Builder](./docs/v4/3.XMLBuilder.md)
158-
4. [XML Validator](./docs/v4/4.XMLValidator.md)
159-
5. [Entities](./docs/v4/5.Entities.md)
160-
6. [HTML Document Parsing](./docs/v4/6.HTMLParsing.md)
161-
7. [PI Tag processing](./docs/v4/7.PITags.md)
156+
<table>
157+
<tr><td>v3</td><td>v4</td><td>v5</td></tr>
158+
<tr>
159+
<td>
160+
<a href="./docs/v3/docs.md">documents</a>
161+
</td>
162+
<td><ol>
163+
<li><a href="./docs/v4/1.GettingStarted.md">Getting Started</a></li>
164+
<li><a href="./docs/v4/2.XMLparseOptions.md">XML Parser</a></li>
165+
<li><a href="./docs/v4/3.XMLBuilder.md">XML Builder</a></li>
166+
<li><a href="./docs/v4/4.XMLValidator.md">XML Validator</a></li>
167+
<li><a href="./docs/v4/5.Entities.md">Entities</a></li>
168+
<li><a href="./docs/v4/6.HTMLParsing.md">HTML Document Parsing</a></li>
169+
<li><a href="./docs/v4/7.PITags.md">PI Tag processing</a></li>
170+
</ol></td>
171+
<td><ol>
172+
<li></li><a href="./docs/v5/1.GettingStarted.md">Getting Started</a></li>
173+
<li><a href="./docs/v5/2.Features.md">Features</a></li>
174+
<li><a href="./docs/v5/3.Options.md">Options</a></li>
175+
<li><a href="./docs/v5/4.OutputBuilders.md">Output Builders</a></li>
176+
<li><a href="./docs/v5/5.ValueParsers.md">Value Parsers</a></li>
177+
</ol></td>
178+
</tr>
179+
</table>
180+
181+
**note**: version 5 is released with version 4 tfor experimental use. Based on it's demand, it'll be developed and the features can be different in final release.
182+
162183
## Performance
184+
<small>negative means error</small>
163185

164186
### XML Parser
165187

166-
![](./docs/imgs/XMLParser_v4.png)
188+
<img align="left" src="./docs/imgs/XMLParser_v4.png" width="45%" />
189+
<img src="./docs/imgs/XMLParser_large_v4.png" width="47%" />
190+
167191
* Y-axis: requests per second
168192
* X-axis: File size
169193

170-
**Large files**
171-
![](./docs/imgs/XMLParser_large_v4.png)
172-
* Y-axis: requests per second
173-
* X-axis: File size
174194
### XML Builder
175195

176-
![](./docs/imgs/XMLBuilder_v4.png)
196+
<img src="./docs/imgs/XMLBuilder_v4.png" width="50%" />
177197
* Y-axis: requests per second
178198

179-
<small>negative means error</small>
180199

181-
[![](static/img/ni_ads_ads.gif)](https://github.com/NaturalIntelligence/ads/)
182200

201+
<!-- [![](static/img/ni_ads_ads.gif)](https://github.com/NaturalIntelligence/ads/) -->
202+
203+
204+
## Usage Trend
205+
206+
[Usage Trend of fast-xml-parser](https://npm-compare.com/fast-xml-parser#timeRange=THREE_YEARS)
207+
208+
<a href="https://npm-compare.com/fast-xml-parser#timeRange=THREE_YEARS" target="_blank">
209+
<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" />
210+
</a>
183211

184212
## Supporters
185213
### Contributors
File renamed without changes.

docs/v5/2. Features.md renamed to docs/v5/2.Features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
- **Output Builder**: Many projects want a different parsing result. Some wants to group the attributes, some wants to skip an attribute or tag, some wants index number with each property, and some wants to group some properties in array. So FXP v5 come up with 3 output builders. User can customize their behavior and use their own custom builder too.
33
- You can control the sequence of value parsing for a tag or attribute
44
- You can pass a string or bytes array as input.
5-
- many to be listed
5+
- many to be listed

docs/v5/3. Options.md renamed to docs/v5/3.Options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ const parser = new XMLParser(parserOptions);
116116
let result = parser.parse(xmlData);
117117

118118
console.log(JSON.stringify(result,null,4));
119-
```
119+
```
File renamed without changes.
File renamed without changes.

lib/fxp.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/fxp.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/fxparser.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/fxparser.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)