scala String to scala.xml.Elem
Asked Answered
R

1

43

I have to convert a string into 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>
Rata answered 6/8, 2014 at 5:18 Comment(0)
G
68
scala> scala.xml.XML.loadString(string)
res0: scala.xml.Elem = <play><scala/></play>
Gliwice answered 6/8, 2014 at 5:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.