$ npm install 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
Check the complete list at ThankYouBackers for our sponsors and supporters.
Through Github
Through OpenCollective
Check the bigger list
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
<br>
in HTML), stop nodes (Eg <script>
in HTML) are supported.I developed v5 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 v5, you have more control on parsing output. Check docs for syntax help and basic understanding.
Please leave a comment in discussion forum for your suggestions and if you really need v5.
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
This project exists thanks to all the people who contribute. [Contribute].
Thank you to all our backers! 🙏 [Become a backer]
© 2010 - cnpmjs.org x YWFE | Home | YWFE