javascript - How to build CDATA values in xml2js for node server? -


i'm trying parse xml file , change cdata value of nodes using xml2js. , write new xml document file. i've tried everything, still not getting anywhere. tried using string "" , "cdata" option in builder class. doesn't work. writes text node undefined i.e. [![cdata[undefined]]

fs.readfile(xmlfileurl, function(err, data) {     parser.parsestring(data, function(err, result) {         //change node value .... , build         var xml = builder.buildobject(result);         fs.writefile(xmlfileurl), xml, function(err) {             if (err) {                 console.log(err);                 return;             }         });     }); }); 


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -