*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
Similar Threads
feature not recognized for SAX driver parser.XMLReaderI
Validate against schema
building error when validating against schema using jdom
How to make setFeature work?
Validating XML with Schema