object Main { def main(args : Array[String]): Unit = { var xml = <Root> <Person>Akira</Person> <Person>Johnny</Person> </Root> println(xml) } }
<Root> <Person>Akira</Person> <Person>Johnny</Person> </Root>
あれ、スペースが入ってる
var person = <Person>akira</Person> var root = <Root>{person}</Root> println(root)
<Root><Person>akira</Person></Root>
これ便利かも