I want to append to a file but I want to start appending before </xml>
tag end. appears. How can I do that?
var fs = require("fs");
fs.appendFile('somefile.xml', 'Content')
I have sth like this but it insert 'content' at the end of file, and I want it in specific line before specific 'keyword'
See Question&Answers more detail:os