use xml2js to convert json to xml, when a null value exists, the conversion fails
related codes
const xml2js = require("xml2js");
let obj = {name: "Super", Surname: "Man", age: 23,dd:"",ll:""};
let builder = new xml2js.Builder();
let xml = builder.buildObject(obj);
console.log( xml);
output result:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>Super</name>
<Surname>Man</Surname>
<age>23</age>
<dd/>
<ll/>
</root>