File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes JDOM Exception - Urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JDOM Exception - Urgent" Watch "JDOM Exception - Urgent" New topic
Author

JDOM Exception - Urgent

Geeta Ramasami
Ranch Hand

Joined: Mar 05, 2003
Posts: 72
When the following code is run we encounter a JDOM Exception:
SAXBuilder builder = new SAXBuilder();
builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
builder.setFeature("http: //xml.org/sax/features/validation/schema", true);
builder.setProperty( "http://apache.org/xml/properties/schema/external-schemaLocation","file:///C:erepairSchema.xsd");

The exception we are getting is:
exception caught org.jdom.JDOMException: http: //xml.org/sax/features/validation feature not recognized for SAX driver org.apache.xerces.parsers.SAXParser

Could anyone help us in the regard as to what would be the cause of this excpetion.

Cheers
Geeta
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Geeta Ramasami:
builder.setFeature("http: //xml.org/sax/features/validation/schema", true);

Try "http://apache.org/xml/features/validation/schema" instead...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDOM Exception - Urgent