web-dev-qa-db-fra.com

scala String to scala.xml.Elem

Je dois convertir une chaîne en XML

scala> val string="<play><scala></scala></play>"
string: String = <play><scala></scala></play>

scala> val xml=(<play><scala></scala></play>)
xml: scala.xml.Elem = <play><scala></scala></play>
31
Govind Singh
scala> scala.xml.XML.loadString(string)
res0: scala.xml.Elem = <play><scala/></play>
52
Marth