Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via pnpm

fast-xml-parser 4.2.7

Validate XML, Parse XML, Build XML without C/C++ based libraries
Package summary
Share
0
issues
1
license
2
MIT
Package created
28 Jan 2017
Version published
30 Jul 2023
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
fast-xml-parser@4.2.7
strnum@1.0.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of fast-xml-parser 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
strnum1.0.54.18 kBMIT
prod

Visualizations

Frequently Asked Questions

What does fast-xml-parser do?

Fast-XML-Parser serves as a swift, JavaScript-based utility enabling developers to validate, parse, and build XML data. It carries out these operations without requiring any C/C++ based libraries. Boasting a faster performance than any other pure JavaScript implementation, it can handle large files (which have been tested up to 100mb in size), supporting controlled parsing using various options. It supports XML Entities, HTML entities, and DOCTYPE entities and can accommodate unpaired tags, stop nodes, among other elements. Importantly, Fast-XML-Parser can almost restore the original XML from a JSON object while preserving the order of tags in the JS object.

How do you use fast-xml-parser?

Using Fast-XML-Parser involves installing it and integrating it into your codebase. For package dependency, you can use the command $ npm install fast-xml-parser or $ yarn add fast-xml-parser. For system command utility, employ $ npm install fast-xml-parser -g.

Example code for 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);

For HTML page usage, you would include the script from a CDN and utilize the parser as follows:

<script src="path/to/fxp.min.js"></script>
:
<script>
  const parser = new fxparser.XMLParser();
  parser.parse(xmlContent);
</script>

As a CLI command, you can use fxparser some.xml.

Where are the fast-xml-parser docs?

The documentation for Fast-XML-Parser resides directly in the GitHub repository. You can find detailed instructions for using the library in the docs folder, which contains separate documentations for versions 3 and 4 of the library; v3 documents and v4 documents.