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.
<script src="https://unpkg.com/xth/xth.min.js"></script>
npm install --save xth
var xml = 'path/to/xml';
var xsl = 'path/to/xsl';
xth(xml, xsl, function(html) {
console.log(html);
});
Go to pldg.github.io/xth (the source code is in gh-pages branch).
- Execute
python3 -m http.server
- Open
http://localhost:8000/test/
Required
Type: String
Path to XML file.
Required
Type: String
Path to XSLT file.
Required
Type: Function
callback(html)
takes the parsed HTML as argument.