title: How to revert XML escaped characters (XML unescape)?
body: <p>I would like a Scala function to return String <code>&amp;</code> when given input <code>&amp;amp;</code>, similarly for all other XML escaped characters.</p>
  
  <p>I have attempted to use <code>xml.Unparsed</code>, maybe in a wrong way, it does not give my the desired output:</p>
  
  <pre><code>scala&gt; val amp = '&amp;'
  amp: Char = &amp;
  
  scala&gt; &lt;a&gt;{amp}&lt;/a&gt;.toString
  res0: String = &lt;a&gt;&amp;amp;&lt;/a&gt;
  
  scala&gt; import scala.xml._
  import scala.xml._
  
  scala&gt; &lt;a&gt;{amp}&lt;/a&gt;.child(0)
  res1: scala.xml.Node = &amp;amp;
  
  scala&gt; xml.Unparsed(&lt;a&gt;{amp}&lt;/a&gt;.child(0).toString)
  res2: scala.xml.Unparsed = &amp;amp;
  </code></pre>
  
  <p>I have also attempted to use <code>xml.Utility.unescape</code>, but it does not give any output at all:</p>
  
  <pre><code>scala&gt; val sb = new StringBuilder
  sb: StringBuilder = 
  
  scala&gt; xml.Utility.unescape("&amp;amp;", sb)
  res0: StringBuilder = null
  
  scala&gt; sb.toString
  res1: String = ""
  
  scala&gt; 
  </code></pre>