ltx

2019-05-17 admin

ltx是什么

什么是ltx,<xml for="JavaScript">

ltx使用教程帮助文档

ltx

JavaScript XML library

build status js-standard-style

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:

  • succinct API to build and manipulate XML objects
  • parse XML strings
  • parse XML streams
  • multiple parser backends
  • JSX compatible (with ltx.createElement pragma)
  • tagged template support ltx<foo bar="${baz}">``

Install

npm install ltx

Parsers

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
sax-js 43,058
libxmljs 56,763
saxes 62,246
node-xml 81,980
node-expat 72,720
ltx/lib/parsers/ltx 490,593

From ltx/benchmarks/parsers.js, higher is better. Node.js v10.11.0 - i5-2520M

Benchmark

npm run benchmark

Test

npm install
npm test

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-65152.html

文章标题:ltx

回到顶部