Nearsighted Prank Master

    xth

    1.1.1 • Public • Published

    XTH

    size-badge downloads-badge

    With xth (xml to html) you can load an XML file and its associated XSLT stylesheet and transform them to HTML.

    No dependencies, weight only 1.3kb.

    Works client-side in all major browsers including Internet Explorer 10 and newer versions.

    Install

    CDN

    <script src="https://unpkg.com/xth/xth.min.js"></script>

    NPM

    npm install --save xth

    Example

    var xml = 'path/to/xml';
    var xsl = 'path/to/xsl';
     
    xth(xml, xsl, function(html) {
      console.log(html);
    });

    Try online

    Go to pldg.github.io/xth (the source code is in gh-pages branch).

    Test locally

    1. Execute npm run test
    2. Open http://127.0.0.1:8080/test/

    API

    xml

    Required
    Type: String

    Path to XML file.

    xsl

    Required
    Type: String

    Path to XSLT file.

    callback

    Required
    Type: Function

    callback(html) takes the parsed HTML as argument.

    Install

    npm i xth

    DownloadsWeekly Downloads

    20

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    7.65 kB

    Total Files

    6

    Last publish

    Collaborators

    • pldg