@xmlaspect/browser-xml

XML, XPath, XSLT in-browser api in ESM. IE11+

Usage no npm install needed!

<script type="module">
  import xmlaspectBrowserXml from 'https://cdn.skypack.dev/@xmlaspect/browser-xml';
</script>

README

browser-xml

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.

Use

There is no external dependencies, library is one file JS.

es6 import from CDN

import browserXml from "https://unpkg.com/@xmlaspect/browser-xml@1.0.5/index.js";

npm

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.

build

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