-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fails to load XML with incorrect DTD #2725
Comments
Imported From: https://issues.scala-lang.org/browse/SI-2725?orig=1 |
@stepancheg said: |
@paulp said: |
@paulp said: Whenever I try to use the RC2 (or RC1) REPL it crashes with the following
error:
$$ scala
Welcome to Scala version 2.8.0.RC2 (OpenJDK 64-Bit Server VM, Java 1.6.0_17).
Type in expressions to have them evaluated.
Type :help for more information.
...
Caused by: org.xml.sax.SAXNotRecognizedException: Feature
'http://apache.org/xml/features/nonvalidating/load-external-dtd' is
not recognized.
at
org.apache.xerces.parsers.AbstractSAXParser.setFeature(AbstractSAXParser.java:
1666)
at
org.apache.xerces.jaxp.SAXParserImpl$$JAXPSAXParser.setFeature0(SAXParserImpl.j
ava:542)
at |
@paulp said: |
@paulp said: |
@dcsobral said: import scala.xml.Elem
import scala.xml.factory.XMLLoader
import javax.xml.parsers.SAXParser
object MyXML extends XMLLoader[Elem] {
override def parser: SAXParser = {
val f = javax.xml.parsers.SAXParserFactory.newInstance()
f.setNamespaceAware(false)
f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
f.newSAXParser()
}
} |
@SethTisue said: Interested community members: if you consider this issue significant, feel free to open a new issue for it on GitHub, with links in both directions. |
XML:
Code:
fails:
Doctype declaration should be ignored when parsing XML.
The text was updated successfully, but these errors were encountered: