xsltproc-wrapper
v1.0.0
Published
A wrapper around xsltproc (depends on the xsltproc command line utility)
Downloads
9
Readme
xsltproc-wrapper
xsltproc-wrapper is a barebones wrapper around the xsltproc
command line utility.
Usage
const result = await xsltproc(options, xsl, ...xml)
- options: a string, as per
man xsltproc - xsl: the name of an xsl file
- xml: the name of one or more xml files
Returns: A promise containing the results or an error
Example
import xsltproc from 'xsltproc-wrapper'
// show version information of your xsltproc utility
console.log(await xsltproc('-V'))
// transform one xml file
console.log(await xsltproc('', feed.xsl, feed.xml))
// transform two xml files
console.log(await xsltproc('', feed.xsl, feed1.xml, feed2.xml))
