| Author |
schema validator
|
n.chenththuran
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("http://xml.org/sax/features/validation", true); parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",schemaPath); ErrorHandlerInterface er=new ErrorHandlerInterface( inCat,pobj); parser.setErrorHandler((ErrorHandler) er); DQMLogger.logInfo("Schema validation applying schema to "+xmlPath+" using "+schemaPath,inCat); parser.parse(xmlPath); 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? rgds
|
 |
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
|
posted

0
|
|
Please indicate the error that you are getting.
|
Spritle Software Blogs
|
 |
 |
|
|
subject: schema validator
|
|
|