Closed real050280 closed 7 years ago
Unfortunately, there is no option to turn that off although it would be really nice if there was. So, you'll probably have to do some sort of regex replace.
Something like this should work:
var o2x = require('object-to-xml');
var obj = { a : { b : 1234 } };
var xml = o2x(obj).replace(/>\s*/g, '>').replace(/\s*</g, '<');
console.log(xml);
//<a><b>1234</b></a>
How do you guys minify the generated output into one-line removing indentations?