Can anyone tell me how to write the "xml" tag to the output? As expected, loadString() method gets rid of it while loading.
object SitemapController extends Controller {
def validDeals = Action { implicit request =>
val xmlStr = "<?xml version="1.0" encoding="UTF-8"?><msg>There's no xml tag</msg>"
Ok( scala.xml.XML.loadString(xmlStr) )
}
}
What I get beck from the controller is just
<msg>There's no xml tag</msg>
No comments:
Post a Comment