• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

schema validator

Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public boolean validate(String xmlPath, String schemaPath,Category inCat,ParameterObject pobj) throws Exception{

try {

DOMParser parser = new DOMParser();
parser.setFeature("http://xml.org/sax/features/validation", true);
ErrorHandlerInterface er=new ErrorHandlerInterface( inCat,pobj);
parser.setErrorHandler((ErrorHandler) er);
DQMLogger.logInfo("Schema validation applying schema to "+xmlPath+" using "+schemaPath,inCat);
return er.isValid();
catch (Exception e){
return false;



i have written a schema validator which doesnt work properly. this is the code . anybody help? any alternatives?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic