I am newbie to Play Framework(Scala)in my project I need to convert XML response values as a normal String
What I actually need
val result:Option[Elem] = //response from web server
for eg consider this XML values as result variable value
<response><play>Scala</play><version>2.3.9</version></response>
I need to get the XML values as String like this below
println("resultString:="+resultString)
needed output
resultString:=<response><play>Scala</play><version>2.3.9</version><response>
I check with these below two methods but it didn't convert the whole XML values into String like what I need.It gave only the values like Scala2.3.9 not like XML String.
val resultString:String = result.get.text
val resultString:String = result.get.toString()
Edited
while print the result.get.toString() it prints the XML values as String but what I am doing in my project is I am setting the String value into some JsObject like this Json.obj("resultString"->result.get.toString()). when I get the JsObject from response,it is just showing the values only,not showing the Tags