06 Feb 2013

Using Catalog Resolvers with scala.XML

If you need to resolve DTDs locally with the scala.xml parser, you should provide a resolveEntity to the XMLLoader adapter:

This works out because NoBindingFactoryAdapter ultimately extends org.xml.sax.helpers.DefaultHandler, and this gives you the default no-op implementations of EntityResolver, DTDHandler, ContentHandler and ErrorHandler.

I figured this out from related questions and answers on Stackoverflow.