Skip to content

Instantly share code, notes, and snippets.

@d6y
Last active December 12, 2015 05:28
Show Gist options
  • Save d6y/4721661 to your computer and use it in GitHub Desktop.
Save d6y/4721661 to your computer and use it in GitHub Desktop.
import org.xml.sax.InputSource
import xml.parsing.{NoBindingFactoryAdapter, FactoryAdapter}
import xml.factory.XMLLoader
import xml.Elem
object ResolvingXML extends XMLLoader[Elem] {
override def adapter: FactoryAdapter = new NoBindingFactoryAdapter() {
override def resolveEntity(publicId: String, systemId: String) : InputSource = {
// use CatalogResolver here
}
}
}
// And use...
val xml = ResolvingXML.loadFile(...someplace...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment