summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-05-22 19:19:35 +0000
committerPaul Phillips <paulp@improving.org>2010-05-22 19:19:35 +0000
commit5b391ab536ccea379b9eb245a47710cf0539c98b (patch)
tree471520e02c3c218915e6930bd7fe5ea4203f4249
parent6043ad6f8fbaa172da4da8dd32966a4997c9885e (diff)
downloadscala-5b391ab536ccea379b9eb245a47710cf0539c98b.tar.gz
scala-5b391ab536ccea379b9eb245a47710cf0539c98b.tar.bz2
scala-5b391ab536ccea379b9eb245a47710cf0539c98b.zip
Reverted r19926 based on reports it breaks thin...
Reverted r19926 based on reports it breaks things under java7 and on android. Ticket #2725 patiently awaits a real XML person. No review.
-rw-r--r--src/library/scala/xml/factory/XMLLoader.scala10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/library/scala/xml/factory/XMLLoader.scala b/src/library/scala/xml/factory/XMLLoader.scala
index 3945e7cfda..006edca054 100644
--- a/src/library/scala/xml/factory/XMLLoader.scala
+++ b/src/library/scala/xml/factory/XMLLoader.scala
@@ -23,17 +23,13 @@ trait XMLLoader[T <: Node]
import scala.xml.Source._
def adapter: FactoryAdapter = new NoBindingFactoryAdapter()
- private val saxFactory = {
+ /* Override this to use a different SAXParser. */
+ def parser: SAXParser = {
val f = SAXParserFactory.newInstance()
f.setNamespaceAware(false)
- // Discovered at: http://www.jdom.org/docs/faq.html#a0350 (see ticket #2725)
- f.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false)
- f
+ f.newSAXParser()
}
- /* Override this to use a different SAXParser. */
- def parser: SAXParser = saxFactory.newSAXParser()
-
/** Loads XML from the given InputSource, using the supplied parser.
* The methods available in scala.xml.XML use the XML parser in the JDK.
*/