2.2.3 • Published 5 years ago

xmlib v2.2.3

Weekly downloads
18
License
ISC
Repository
github
Last release
5 years ago

XML.js

XML library that works the same in the browser and in node.js

import XML from 'xmlib';

XML.parse & XML.stringify work like their JSON equivalents.

let xml = XML.parse(`<tag> <subtag> text </subtag> </tag>`);
XML.stringify(xml); // -> <tag> <subtag> text </subtag> </tag>

XML.transform applies an XSL Transformation.

XML.transform(xml,your_XSL_transformation);

added xpath function to every DOMNode to facilitate xpath evaluation

XML.parse(`<a> <b> <c> <d> hello </d> <d id='2'> hi </d> </c> </b> </a>`).xpath('//b')[0].xpath('.//d[@id=2]') // -> <d> hi </d>

https://www.npmjs.com/package/xmlib

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.1.9

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.4

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.2

5 years ago

2.1.3

5 years ago

2.1.1

6 years ago

2.0.9

6 years ago

2.1.0

6 years ago

2.0.8

6 years ago

2.0.5

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.4

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago