Scala Play reading XML string -
i sending xml(text/xml)
content-type , in controller getting string as
`anycontentasxml(<sometag>....</sometag>)`
which should like
'<?xml version='1.0' encoding='utf-8'?><sometag>....</sometag>`
so how can convert anycontentasxml
xml string?
play has builtin xml body parser, can use like
def someendpoint = action(parse.xml) { request => val elementopt = request.body \\ "someelement" headoption }
notice that, request.body
nodeseq
, can used xml releated thing.
Comments
Post a Comment