By Alvin Alexander. Last updated: June 4, 2016
This page shows a good Scala XML EntityRef
example:
import scala.xml._ val xml = <body>Hello{EntityRef("#8198")}World</body>
That page states that 8198
is the unicode value for a tiny space character.
That code isn't too helpful unless you can see it in the REPL, so here it is:
scala> import scala.xml._ import scala.xml._ scala> val xml = <body>Hello{EntityRef("#8198")}World</body> xml: scala.xml.Elem = <body>Hello World</body> scala> xml.text res0: String = Hello World
As you can see, EntityRef
converts the #8198
value it's given into the output value  
.