When I insert arbitrary expressions inside xml literals it seems that result of .toString()
is inserted
object Foo {
override def toString: String = "foo"
}
println(<div>{Foo}</div>) // prints "<div>foo</div>"
Can I customize that process in a way other than overriding toString? Add method toXml or something? Note, I'd like to avoid explicit <div>{Foo.toXml}</div>
.