The moose likes XML and Related Technologies and the fly likes schema validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "schema validator" Watch "schema validator" New topic

schema validator

Ranch Hand

Joined: Jun 16, 2004
Posts: 41
public boolean validate(String xmlPath, String schemaPath,Category inCat,ParameterObject pobj) throws Exception{

try {

DOMParser parser = new DOMParser();
parser.setFeature("", 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 validator method which doesnt work properly. could you plz advice on this. are there any alternatives?

Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Please indicate the error that you are getting.

Spritle Software Blogs
I agree. Here's the link:
subject: schema validator
It's not a secret anymore!