Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDOM Exception - Urgent

 
Geeta Ramasami
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Geeta Ramasami:
builder.setFeature("http: //xml.org/sax/features/validation/schema", true);

Try "http://apache.org/xml/features/validation/schema" instead...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic