fast-xml-parser
Advanced tools
Weekly downloads
Readme
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
Check ThankYouBackers for our supporters
Check the list of all known users here;
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.
<br>
in HTML), stop nodes (Eg <script>
in HTML) are supported.To use as package dependency
$ npm install fast-xml-parser
or
$ yarn add fast-xml-parser
To use as system command
$ npm install fast-xml-parser -g
To use it on a webpage include it from a CDN
Example
As CLI command
$ fxparser some.xml
In a node js project
const { XMLParser, XMLBuilder, XMLValidator} = require("fast-xml-parser");
const parser = new XMLParser();
let jObj = parser.parse(XMLdata);
const builder = new XMLBuilder();
const xmlContent = builder.build(jObj);
In a HTML page
<script src="path/to/fxp.min.js"></script>
:
<script>
const parser = new fxparser.XMLParser();
parser.parse(xmlContent);
</script>
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 |
v3
v4
Large files
negative means error
Tian
.This project exists thanks to all the people who contribute. [Contribute].
Thank you to all our backers! 🙏 [Become a backer]
Validate XML, Parse XML, Build XML without C/C++ based libraries
The npm package fast-xml-parser receives a total of 7,648,844 weekly downloads. As such, fast-xml-parser popularity was classified as popular.
We found that fast-xml-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.