Share

Piccolo XML Parser for Java

Tracker: Bugs

5 Java 5: builtin validating Parser not found - ID: 1235630
Last Update: Comment added ( nobody )

Under Java 5, for

SAXParserFactory f =
SAXParserFactory.newInstance();
f.setValidating(true);

I get:

javax.xml.parsers.ParserConfigurationException: XML
document validation is not supported

That's because the builtin SAXParserFactory now is
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
which should be checked for in JAXPSAXParserFactory:

// Try Java 5 built-in
try {
return Class.forName(

"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
}
catch (ClassNotFoundException e) {
}

// Finally try Crimson, Java 1.4 built-in
try {
return Class.forName(

"org.apache.crimson.jaxp.SAXParserFactoryImpl");
}
catch (ClassNotFoundException e) {
return null;
}



Nobody/Anonymous ( nobody ) - 2005-07-10 16:22

5

Open

None

Nobody/Anonymous

Other

None

Public


Comment ( 1 )




Date: 2005-07-10 22:42
Sender: nobody

Logged In: NO

PS:
That's of course after I fixed all the other related
problems in the same area already listed.
mschulz@dinmar.com


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.