I have some Javascript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form:
var encodedStr = 'hello & world'; var parser = new DOMParser; var dom = parser.parseFromString( '' + encodedStr, 'text/html'); var decodedString = dom.body.textContent; console.log(decodedString);