Start Validating schema java

Validating schema java

The Error Handler used for the examples is a very simple one which reports the error to and continues until the XML document has been fully parsed or until a fatal-error has been reported.

It enables you to quickly check that input is roughly in the form you expect and quickly reject any document that is too far away from what your process can handle.

For example, suppose you want to log all validation errors, but you don't want to stop processing when you encounter one.

You can install an error handler such as that in Listing 3. For example, they can provide default attribute values.

If there's a problem with the data, it's better to find out earlier than later.