I am newbie to node.js. I have created a child process in node.js to connect it with my Java program. I used eclipse to create an executable jar file(Saxon.jar). This is my app.js(JavaScript) file.
var fs = require('fs');
var exec = require('child_process').exec;
var child = exec('java -jar Saxon.jar',
function (error, stdout, stderr){
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if(error !== null){
console.log('exec error: ' + error);
}
});
module.exports = child;
My Java program is converting xml into html webpage using xslt stylesheet. Right now, I am getting my result in command prompt. The result looks like this:
https://i.sstatic.net/2yTIY.png
I want my output to write in a HTML file.