playframework/playframework — pull request #1622 by huntc (2013-09-09 08:28:38+00:00)
Title: Unnecessary XML validation

XML validation against a schema is not required within Play and could present an unnecessary performance overhead. Places where XML validation is performed are:

* L422 of ContentTypes.scala
* L662 of WS.scala

Recommendation in terms of establishing a loader:

val f = javax.xml.parsers.SAXParserFactory.newInstance()
f.setValidating(false)
val p = f.newSAXParser()
val nonValidatingXml = xml.XML.withSAXParser(p)

...and when required

val doc = nonValidatingXml.load(url)