If I try to create a new XML document in Java applet through this code:
DocumentBuilderFactory.newInstance ();
I will get this error:
Java plug-in 1.6.0_19 JRE version 1.6.0_1 9-B4 Java hotspot (TM) client Using VM JavaX .xml.parsers.FactoryConfigurationError: Provider & lt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Stronger // N" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict DTD "& gt; I did not get it on Javax.xml.parsers.DocumentBuilderFactory.newInstance (unknown source)
I do not care about DTD.
- Why is this searching?
- How should I create an XML document in Java Applets
- How can I work it out?
The attached HTML document looks like this:
& lt ;! DOCTYPE html public "- // W3C // DTT XHTML 1.0 Stronger // n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Loading ... & lt; / Title & gt; & Lt; / Head & gt;
?
The problem was with the organization Resolver, which points to the w3c.org website. Access to the reference DTDs on this site has been restricted for application use. The solution to this was to implement my own survivor.
If you're all doing then CallBuilderFactory.newInstance ();
So this should not be the cause of an error. The posts you linked to are not relevant.
javax.xml.parsers.FactoryConfigurationError: Provider & lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD XHTML 1.0 Strongly //n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Not found
This suggests some strange configuration error / bugs to the provider (I think) JAXP implementation should be the name of the factory category. Check that you set the javax.xml.parsers.DocumentBuilderFactory
system property or file the invalid META-INF / services / javax.xml.parsers.DocumentBuilderFactory
on your applet class path. .
Comments
Post a Comment