5.0.9 • Published 11 days ago

fast-xml-parser v5.0.9

Weekly downloads
670,327
License
MIT
Repository
github
Last release
11 days ago

fast-xml-parser

NPM total downloads

Validate XML, Parse XML to JS Object, or Build XML from JS Object without C/C++ based libraries and no callback.

  • Validate XML data syntactically. Use detailed-xml-validator to verify business rules.
  • Parse XML to JS Objectand vice versa
  • Common JS, ESM, and browser compatible
  • Faster than any other pure JS implementation.

It can handle big files (tested up to 100mb). XML Entities, HTML entities, and DOCTYPE entites are supported. Unpaired tags (Eg <br> in HTML), stop nodes (Eg <script> in HTML) are supported. It can also preserve Order of tags in JS object


Your Support, Our Motivation

Try out our New Thoughts

We've recently launched Flowgger

Don't forget to check our new library Text2Chart that constructs flow chart out of simple text. Very helpful in creating or alayzing an algorithm, and documentation purpose.

Financial Support

Sponsor this project

fxp_sponsors

This is a donation. No goods or services are expected in return. Any requests for refunds for those purposes will be rejected.

Users

more

The list of users are mostly published by Github or communicated directly. Feel free to contact if you find any information wrong.


More about this library

How to use

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>

Bundle size

Bundle NameSize
fxbuilder.min.js6.5K
fxparser.min.js20K
fxp.min.js26K
fxvalidator.min.js5.7K

Documents

note:

  • Version 6 is released with version 4 for experimental use. Based on it's demand, it'll be developed and the features can be different in final release.
  • Version 5 has the same functionalities as version 4.

Performance

negative means error

XML Parser

  • Y-axis: requests per second
  • X-axis: File size

XML Builder


Usage Trend

Usage Trend of fast-xml-parser

Supporters

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers from Open collective

Thank you to all our backers! 🙏 [Become a backer]

License

  • MIT License

Donate $5

is-svg@google-cloud/storagevue-fast-xml-parser@build-tools-for-vmware-aria/codifyfork-appcenter-cli@beskar-labs/medium-feedaggregation-ssmlcfw-r2-proxy@kazion/dpo-node-sdkeasy-select-rn@weirwoodai/parse-xbrlfaa-notam-sdk-testanghamimediaenginebroadsoftocihpservercatastro-clientwebdriverio-typescript-dockerworkspace-webdriveriornjs_v1schema-ohhc-stuffilitofa-beautifierfa-nodejsfa-nodejs-beautifierfoxartuni-app-hybrid-packalpine-code-sdk-jssommario-app@liongard/roar-sdkfeed-simulcast@iharob/graphql-mesh-odatarentsure-crm-data-processortransmetrix-paymentsniconico-apis@rappopo/cuk-util@tomfrenken/generatormta-node@the_anomaly/web-theoryboardgamegeekjsclientfaa-notam-sdkhomebridge-infinitude-schedulesradiko-apipostal-middlewareiobroker.onkyo2mtabt-plugin-metawrm-troubleshooting-poc@isygis/veiprofilgenerator-conacyt@alpine-code/alpine-code-sdk-jsscreenplay-parsermyfrontdesk-testmta-build-toolrun-statsards-clientvsdxjssid-npm-test3sid-npmtest-1sid-npmtest-2sid-test-create-npmpagsg-api@eonenergy/eon-sfdx@elijahjpassmore/qwc2anuvadak@oai-pmh-js/oai-xml-parsergatsby-source-pollenvarsel@rtlib/qa-cliopenpanos-server@picker-cc/wechat-pluginapogistrapi-wizualizacje-templateodata-xtractunblock-block-save-variables@bugsounet/nat-apihappy-wheelshappywheels.jshexa-node-common@infinitebrahmanuniverse/nolb-fast-@ndml/version-api@ethang/util-typescriptqueryfinitemodels@1password/web-apinode_wehcat_openlandonschropp.comnav-invoicefa-basefa-frameworkgetbankapi-bnmluminos-ui-coretesting-ci-ortsa-rssebbplottervideo-templatestylesettergenerator-jhipster-wda@everything-registry/sub-chunk-1649jawwy-sdkjawwy_gamification_releasesitemap-generator-webpack-plugin@bioroxx/kmljsyourdata-sdkreact-native-sphereuisphereui
5.0.9

11 days ago

5.0.8

27 days ago

5.0.7

28 days ago

4.5.3

1 month ago

5.0.6

1 month ago

5.0.5

1 month ago

5.0.4

1 month ago

5.0.3

1 month ago

5.0.2

1 month ago

5.0.1

1 month ago

5.0.0

1 month ago

4.5.2

1 month ago

4.5.1

3 months ago

4.5.0

7 months ago

4.4.1

8 months ago

4.4.0

10 months ago

4.3.6

1 year ago

4.3.5

1 year ago

4.3.4

1 year ago

4.3.3

1 year ago

4.3.2

1 year ago

4.3.1

2 years ago

4.3.0

2 years ago

4.2.5

2 years ago

4.2.7

2 years ago

4.2.6

2 years ago

4.2.3

2 years ago

4.2.4

2 years ago

4.2.2

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.2

2 years ago

4.0.15

2 years ago

4.0.14

2 years ago

4.1.0

2 years ago

4.1.1

2 years ago

4.0.12

2 years ago

4.0.11

2 years ago

4.0.13

2 years ago

4.0.10

3 years ago

4.0.9

3 years ago

4.0.8

3 years ago

4.0.5

3 years ago

4.0.4

3 years ago

4.0.7

3 years ago

4.0.6

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.0-beta.8

3 years ago

4.0.0-beta.7

3 years ago

4.0.0-beta.6

3 years ago

4.0.0-beta.5

3 years ago

4.0.0-beta.4

3 years ago

4.0.0-beta.3

3 years ago

4.0.0-beta.2

3 years ago

4.0.0-beta.0

3 years ago

3.21.1

3 years ago

3.21.0

3 years ago

3.20.3

3 years ago

3.20.0

4 years ago

3.19.0

4 years ago

3.18.0

4 years ago

3.17.6

4 years ago

3.17.5

4 years ago

3.17.4

5 years ago

3.17.3

5 years ago

3.17.2

5 years ago

3.17.1

5 years ago

3.17.0

5 years ago

3.16.0

5 years ago

3.15.1

5 years ago

3.15.0

5 years ago

3.14.0

5 years ago

3.13.0

5 years ago

3.12.21

5 years ago

3.12.20

6 years ago

3.12.19

6 years ago

3.12.18

6 years ago

3.12.17

6 years ago

3.12.16

6 years ago

3.12.14

6 years ago

3.12.13

6 years ago

3.12.12

6 years ago

3.12.11

6 years ago

3.12.10

6 years ago

3.12.9

6 years ago

3.12.8

6 years ago

3.12.7

6 years ago

3.12.5

7 years ago

3.12.4

7 years ago

3.12.3

7 years ago

3.12.2

7 years ago

3.12.0

7 years ago

3.11.2

7 years ago

3.11.1

7 years ago

3.11.0

7 years ago

3.10.0

7 years ago

3.9.11

7 years ago

3.9.10

7 years ago

3.3.9

7 years ago

3.3.8

7 years ago

3.3.7

7 years ago

3.3.6

7 years ago

3.3.5

7 years ago

3.3.4

7 years ago

3.3.3

7 years ago

3.3.2

7 years ago

3.3.1

7 years ago

3.3.0

7 years ago

3.2.4

7 years ago

3.2.3

7 years ago

3.2.2

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.9.4

7 years ago

2.9.3

7 years ago

2.9.2

7 years ago

2.9.1

7 years ago

2.9.0

7 years ago

2.8.3

7 years ago

2.8.2

7 years ago

2.8.1

7 years ago

2.8.0

7 years ago

2.7.4

8 years ago

2.7.3

8 years ago

2.7.2

8 years ago

2.7.1

8 years ago

2.7.0

8 years ago

2.6.0

8 years ago

2.5.1

8 years ago

2.5.0

8 years ago

2.4.4

8 years ago

2.4.3

8 years ago

2.4.1

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago