我必须将字符串转换为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>
答案 0 :(得分:50)
scala> scala.xml.XML.loadString(string)
res0: scala.xml.Elem = <play><scala/></play>