Package com.helger.xml.schema
Class XMLSchemaValidationHelper
- java.lang.Object
-
- com.helger.xml.schema.XMLSchemaValidationHelper
-
@Immutable public final class XMLSchemaValidationHelper extends Object
A helper class for simple XSD validation.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.IErrorListvalidate(com.helger.commons.io.resource.IReadableResource[] aSchemas, Source aXML)static 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.IErrorListvalidate(com.helger.commons.io.resource.IReadableResource aSchema, Source aXML)static com.helger.commons.error.list.IErrorListvalidate(Schema aSchema, com.helger.commons.io.resource.IReadableResource aXML)static com.helger.commons.error.list.IErrorListvalidate(Schema aSchema, Source aXML)static voidvalidate(Schema aSchema, Source aXML, com.helger.commons.error.list.ErrorList aErrorList)Validate 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 Detail
-
validate
@Nonnull public static com.helger.commons.error.list.IErrorList validate(@Nonnull com.helger.commons.io.resource.IReadableResource aSchema, @Nonnull com.helger.commons.io.resource.IReadableResource aXML)
-
validate
@Nonnull public static com.helger.commons.error.list.IErrorList validate(@Nonnull @Nonempty com.helger.commons.io.resource.IReadableResource[] aSchemas, @Nonnull com.helger.commons.io.resource.IReadableResource aXML)
-
validate
@Nonnull public static com.helger.commons.error.list.IErrorList validate(@Nonnull Schema aSchema, @Nonnull com.helger.commons.io.resource.IReadableResource aXML)
-
validate
@Nonnull public static com.helger.commons.error.list.IErrorList validate(@Nonnull @Nonempty com.helger.commons.io.resource.IReadableResource aSchema, @Nonnull Source aXML)
-
validate
@Nonnull public static com.helger.commons.error.list.IErrorList validate(@Nonnull @Nonempty com.helger.commons.io.resource.IReadableResource[] aSchemas, @Nonnull Source aXML)
-
validate
@Nonnull public static com.helger.commons.error.list.IErrorList validate(@Nonnull Schema aSchema, @Nonnull Source aXML)
-
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
-
-