Improved unescaping of XML