I have some Javascript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form:
element.innerText also does the trick.
element.innerText