In-browser XML, XPath, XSLT api, packaged with sources in es6 and binaries compiled into UMD/AMD ES5.
Browsers starting from IE11.
Project as successor of AmdHarness-amd-xml covers the XML stack for es6 module based JS projects.
The npm module includes the sources in es6 format which could be consumed by modern browsers via import statement.
There is no external dependencies, library is one file JS.
import browserXml from "https://unpkg.com/@xmlaspect/browser-xml@1.0.5/index.js";install as dependency into your npm project.
$ npm i -P "@xmlaspect/browser-xml"
In your project JS
import browserXml from "@xmlaspect/browser-xml";
let xmlDoc = await browserXml.getXml( xmlUrl );
let nodes = browserXml.XPath( '//my-el[@name="abc"]', xmlDoc );
let renderedString = browserXml.transform( xml, xslUrl );See more samples in test sources.
There is no binaries build. Please use your project build toolchain to generate specific binary format like AMD.
Please file the new issue if need binary of particular format as a part of npm package or in CDN.
#test reside in sibling project https://github.com/XmlAspect/browser-xml-test