Package com.helger.xml.schema
Class XMLSchemaValidationHelper
java.lang.Object
com.helger.xml.schema.XMLSchemaValidationHelper
A helper class for simple XSD validation.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.helger.commons.error.list.IErrorListvalidate(com.helger.commons.io.resource.IReadableResource[] aSchemas, com.helger.commons.io.resource.IReadableResource aXML) static com.helger.commons.error.list.IErrorListstatic com.helger.commons.error.list.IErrorListvalidate(com.helger.commons.io.resource.IReadableResource aSchema, com.helger.commons.io.resource.IReadableResource aXML) static com.helger.commons.error.list.IErrorListstatic com.helger.commons.error.list.IErrorListstatic com.helger.commons.error.list.IErrorListstatic voidValidate the passed XML against the passed XSD and put all errors in the passed error list.static voidvalidate(Schema aSchema, Source aXML, com.helger.commons.error.list.ErrorList aErrorList, Locale aLocale) Validate the passed XML against the passed XSD and put all errors in the passed error list.
-
Method Details
-
validate
-
validate
-
validate
-
validate
-
validate
-
validate
-
validate
public static void validate(@Nonnull Schema aSchema, @Nonnull Source aXML, @Nonnull com.helger.commons.error.list.ErrorList aErrorList) Validate the passed XML against the passed XSD and put all errors in the passed error list.- Parameters:
aSchema- The source XSD. May not benull.aXML- The XML to be validated. May not benull.aErrorList- The error list to be filled. May not benull.- Throws:
IllegalArgumentException- If XSD validation failed with an exception- Since:
- 8.5.3
-
validate
public static void validate(@Nonnull Schema aSchema, @Nonnull Source aXML, @Nonnull com.helger.commons.error.list.ErrorList aErrorList, @Nullable Locale aLocale) Validate the passed XML against the passed XSD and put all errors in the passed error list.- Parameters:
aSchema- The source XSD. May not benull.aXML- The XML to be validated. May not benull.aErrorList- The error list to be filled. May not benull.aLocale- The locale to use for error messages. May benullto use the system default locale.- Throws:
IllegalArgumentException- If XSD validation failed with an exception- Since:
- 9.0.1
-