Answers for "read xml file node js"

0

js read xml file

parser = new DOMParser();
xmlDoc = parser.parseFromString(<TEXT_TO_PARSE>,"text/xml");
Posted by: Guest on July-03-2021
0

render XML in node

app.get('/sitemap.xml', function (req, res) {
  fs.readFile("./path/to/sitemap.xml", "utf-8", (err, data) => {
    if (err) {
      console.error(err);
      return
    }
    console.log(data);
    res.end(data) // Send Data
  });
});
Posted by: Guest on June-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language