wood burning stoves 2.0*
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

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.

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
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