xml-lite
Maintaining XML in pure javascript (IN BOTH NODE.JS & BROWSERS) Homepage
Maintaining?
Converting
Editing/Traversing
XMLLite;XMLLite;XMLLite;XMLLite;XMLLite;// ...
Formatting
XMLLite;XMLLite;XMLLite;// ...
Actually, you can get the js object from XMLLite.xml2js(xml)
, do whatever you want, and convert it back to xml again with XMLLite.js2xml(obj)
.
Why?
- A reasonable need for usage in both Node.js and Browsers
- A more reasonable need to use native APIs(DOMParser/XMLSerializer) to speed up the maintaining process and keep the library thin
xml-lite
?
Why - It works exactly the same in both Node.js and Browsers
- The browser version is supper light-weight(dist/xml-lite.js)
- Convenient APIs for converting between xml/js/json/DOM, and lots of helpers to maintain the data structures
- Super fast. it takes less than 30ms to convert an xml document with over 1,000 nodes into a js object
Install
$ npm install xml-lite --save$ npm install xml-lite -g
Usage
In Node.js
const XMLLite = ;
Command line client
$ xml-lite --help
In browsers
In browsers with webpack
;