Trim surrounding whitespace from xml content

Resolves https://github.com/playframework/playframework/issues/2770