I would like to find out how to get more detailed validation errors.

I am generating a very large XML document. After generation is complete, I validate it and handle the messages. The problem is I'm getting message without any reference to the attribute or element name that it was caused by. For example:

        error: decimal: Invalid decimal value: expected at least one digit

Here's the sample code:

        List validationErrors = new ArrayList();
                 XmlOptions validationOptions = new XmlOptions();
                 validationOptions.setErrorListener( validationErrors );

        if( !document.validate( validationOptions ) ) {
                for( Iterator objects = validationErrors.iterator(); objects.hasNext(); ) {
                                       Object object = objects.next();
                                       System.out.println( object );
                            }
        }

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

Reply via email to