By Alvin Alexander. Last updated: January 15 2017
A really terrific feature about Scala is that XML handling is built into the language. This means you don't have to deal with XML as String objects, you deal with it as XML objects.
Here are just a few examples of using XML in Scala. First, you can create an XML literal like this:
scala> val hello = <p>Hello, world</p>
hello: scala.xml.Elem = <p>Hello, world</p>
Again, note that this is not a String, there are no double quotes; we've just defined an XML literal in Scala.