var linkedom = require('linkedom')
var parser = new linkedom.DOMParser()
var doc = parser.parseFromString(`<hierarchy><android.view.View content-desc="text3&more"/></hierarchy>`, 'text/xml')
console.log(doc.documentElement.innerHTML) // '<android.view.View content-desc="text3&more" />'
Using the same code on a DOMParser from a browser or JSDOM gives <android.view.View content-desc="text3&more"/>
Repro:
Using the same code on a DOMParser from a browser or JSDOM gives
<android.view.View content-desc="text3&more"/>