Validate xml with dsx and getting a list of validation errors
Hello.
I need to validate an xml files with xsd and obtain list of validation errors. Is this even possible?
What I've been doing so far is:
DocumentBuilder parser = dbf.newDocumentBuilder();// this is from javax.xml.parsers
Validator handler =new Validator();
parser.setErrorHandler(handler);
Document doc = parser.parse(new InputSource(is) );
if (handler.validationError)
throw handler.saxParseException;
else
return doc;
and then if there is an exception, I look at its content to know what the validation error is. This is fine except it only gives me the first validation error! What do I have to do to know all the other ones?
Thanks

