# [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser)
[![Backers on Open Collective](https://opencollective.com/fast-xml-parser/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/fast-xml-parser/sponsors/badge.svg)](#sponsors) [![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.
> Looking for maintainers
Support this project by becoming a **Sponsor**.
Click on Sponsor button above or
### Sponsors
Check [ThankYouBackers](https://github.com/NaturalIntelligence/ThankYouBackers) for our supporters
## Users
Check the list of all known users [here](./USERs.md);
The list of users is collected either from the list published by Github, cummunicated 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.
## 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/)
## Our other projects and research you must try
* **[BigBit standard](https://github.com/amitguptagwl/bigbit)** :
* Single text encoding to replace UTF-8, UTF-16, UTF-32 and more with less memory.
* Single Numeric datatype alternative of integer, float, double, long, decimal and more without precision loss.
* **[Cytorus](https://github.com/NaturalIntelligence/cytorus)**: Be specific and flexible while running E2E tests.
* Run tests only for a particular User Story
* Run tests for a route or from a route
* Customizable reporting
* Central dashboard for better monitoring
* Options to integrate E2E tests with Jira, Github etc using Central dashboard `Tian`.
* **[Stubmatic](https://github.com/NaturalIntelligence/Stubmatic)** : Create fake webservices, DynamoDB or S3 servers, Manage fake/mock stub data, Or fake any HTTP(s) call.
## 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)