lite-xml
v1.4.3
Published
A very lightweight XML construction library.
Downloads
7
Readme
Lite-XML
A very lightweight XML construction library.
Installation
You can install lite-xml using npm, yarn, or pnpm:
npm install lite-xml
yarn add lite-xml
pnpm add lite-xml
Documentation
See the API Documentation
Modules
Lite-XML includes three kinds of JavaScript module format. The process for achieving this is inspired by this blog post from SenseDeep. This library uses ESBuild for constructing each module platform.
ES Module
Exports all code as an ECMAScript Module, suitable for import
:
import * as liteXml from 'lite-xml'
ES Modules are typically used:
- In browser-based applications.
- In applications that use a JS bundler system (ex: Bundler, Bun, Webpack, ESBuild, Vite, etc).
- In modern Node.js applications.
CommonJS / Node module
Exports all code as a CommonJS, suitable for require
.
const liteXML = require('lite-xml')
CommonJS modules are typically used by older Node.JS applications.
Browser script.
Exports all code as a ES6 script suitable for inclusion in browsers. The code is wrapped in an Immediately invoked function expression (or "IIFE").
<script src='lite-xml/dist/browser/index.js'>
Browser scripts are typically used by older web browser-based applications.
License
lite-xml is licensed under the MIT License.