package
<xml for="JavaScript">
npm install ltxGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
65.9 kB
Includes dependencies.
JavaScript XML library
ltx is a fast XML builder, parser, serialization and manipulation library for JavaScript.
The builder is a convenient and succinct API to build XML documents represented in memory as JavaScript primitives that can be serialized to XML strings.
The parser can parse XML documents or streams and support multiple parsers.
Features:
ltx.createElement pragma)ltx`<foo bar="${baz}">`npm install ltx
By default ltx uses its own parser which is the fastest but doesn't support advanced XML features. ltx supports third party parsers when such features are needed.
| parser | ops/sec | JS | stream |
|---|---|---|---|
| node-xml | 22,292 | ☑ | ☑ |
| libxmljs | 48,116 | ☐ | ☐ |
| node-expat |
From ltx/benchmarks/parsers.js, higher is better. Node.js v14.17.0 - AMD Ryzen 9 5900HX
npm run benchmarknpm install
npm testchris-rock
chris@lollyrock.com
| 63,805 |
| ☐ |
| ☑ |
| sax-js | 79,375 | ☑ | ☑ |
| saxes | 168,263 | ☑ | ☑ |
| ltx/src/parsers/ltx | 527,728 | ☑ | ☑ |