Hide Console Warning messages from xmldom in NodeJS
I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.
Here is the quick way to hide the warning xml parsing message using xmldom package in NodeJs.
var DOMParser = require("xmldom").DOMParser;
var parser = new DOMParser({
locator: {},
errorHandler: {
warning: function (w) {},
error: function (e) {},
fatalError: function (e) {
console.error(e);
},
},
});