Closed HeavenlyHost closed 6 years ago
You shouldn't directly use the xml object, but use the return value of end
which is the xml object converted to a string. e.g.:
var xmlStr = xml.end({ pretty: true });
console.log(xmlStr);
fs.writeFile("./app/test.xml", xmlStr, function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
Fabulous that worked for me, KUDOS !
Might be worth noting this on the readme :+1:
Unable to get the prolog to display
<?xml version="1.0" encoding="utf-8"?>
This will not display... A code snippet
var writeToXML = function () { // Recreate the manifest file based on contents of the app directory
};