Parsing an empty element should result in an empty array, not string with \n's
I see how this makes sense for a text node. Is there a way to get an empty array instead?
const xml2js = require('xml2js')
const xmlbuilder = new xml2js.Builder()
const xmlparser = new xml2js.Parser()
let x = `
<result timestamp="1602848610696">
<items>
</items>
</result>
`
let res = await xmlparser.parseStringPromise(x)
res = res.result
l('parser result', JSON.stringify(res))
Parsing an empty element should result in an empty array, not string with \n's I see how this makes sense for a text node. Is there a way to get an empty array instead?
outputs
Expected: