Does anyone know how to get better validation error messages?

For example I just got this "cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for 4" How do I know what element is causing this? I have quite a large XML Doc.

I tried casting the actual validationErrors coming back to XmlValidationErrors (which is their type), but unfortunatly there isn't any relevant data in it's fields.


Here's the code:

         XmlOptions validationOptions = new XmlOptions();
                 validationOptions.setErrorListener( validationErrors );
       
        if( !document.validate( validationOptions ) ) {
                for( Iterator objects = validationErrors.iterator(); objects.hasNext(); ) {
                                       Object object = objects.next();
                                       if( object instanceof XmlValidationError ) {


-peter --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to