# [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser)
[![Known Vulnerabilities](https://snyk.io/test/github/naturalintelligence/fast-xml-parser/badge.svg)](https://snyk.io/test/github/naturalintelligence/fast-xml-parser)
[![NPM quality][quality-image]][quality-url]
[![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)
[](https://naturalintelligence.github.io/fast-xml-parser/)
[![NPM total downloads](https://img.shields.io/npm/dt/fast-xml-parser.svg)](https://npm.im/fast-xml-parser)
[quality-image]: http://npm.packagequality.com/shield/fast-xml-parser.svg?style=flat-square
[quality-url]: http://packagequality.com/#?package=fast-xml-parser
Validate XML, Parse XML to JS Object, or Build XML from JS Object without C/C++ based libraries and no callback.
> XML Parser v5 is added for experimental use
> https://solothought.com
Sponsor this project 👉
### Current Sponsors
Check the complete list at [ThankYouBackers](https://github.com/NaturalIntelligence/ThankYouBackers) for our sponsors and supporters.
Through Github
Through OpenCollective
## Users
Check the bigger [list](./USERs.md)
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.
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
- githubissues@proton.me
- https://linkedin.com/in/amitguptagwl/
## Main Features
* Validate XML data syntactically
* Parse XML to JS Object
* Build XML from JS Object
* Works with node packages, in browser, and in CLI (press try me button above for demo)
* Faster than any other pure JS implementation.
* It can handle big files (tested up to 100mb).
* Controlled parsing using various options
* XML Entities, HTML entities, and DOCTYPE entites are supported.
* unpaired tags (Eg `
` in HTML), stop nodes (Eg `
:
```
Check lib folder for different browser bundles
| Bundle Name | Size |
| ------------------ | ---- |
| fxbuilder.min.js | 5.2K |
| fxparser.js | 50K |
| fxparser.min.js | 17K |
| fxp.min.js | 22K |
| fxvalidator.min.js | 5.7K |
### Documents
**v3**
* [documents](./docs/v3/docs.md)
**v4**
1. [GettingStarted.md](./docs/v4/1.GettingStarted.md)
2. [XML Parser](./docs/v4/2.XMLparseOptions.md)
3. [XML Builder](./docs/v4/3.XMLBuilder.md)
4. [XML Validator](./docs/v4/4.XMLValidator.md)
5. [Entities](./docs/v4/5.Entities.md)
6. [HTML Document Parsing](./docs/v4/6.HTMLParsing.md)
7. [PI Tag processing](./docs/v4/7.PITags.md)
## Performance
### XML Parser
![](./docs/imgs/XMLParser_v4.png)
* Y-axis: requests per second
* X-axis: File size
**Large files**
![](./docs/imgs/XMLParser_large_v4.png)
* Y-axis: requests per second
* X-axis: File size
### XML Builder
![](./docs/imgs/XMLBuilder_v4.png)
* Y-axis: requests per second
negative means error
[![](static/img/ni_ads_ads.gif)](https://github.com/NaturalIntelligence/ads/)
## Supporters
### Contributors
This project exists thanks to [all](graphs/contributors) the people who contribute. [[Contribute](docs/CONTRIBUTING.md)].
### Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/fast-xml-parser#backer)]
# License
* MIT License
![Donate $5](static/img/donation_quote.png)