Class XmlSchemaValidator

java.lang.Object
org.projecthusky.validation.service.schema.XmlSchemaValidator

@ThreadSafe public class XmlSchemaValidator extends Object
An XML Schema validator.

It's thread safe.

Author:
Quentin Ligier
  • Constructor Details

    • XmlSchemaValidator

      public XmlSchemaValidator(Source schema, boolean allowDtd, boolean allowInclude, @Nullable LSResourceResolver resourceResolver) throws SAXException
      Constructor.
      Parameters:
      schema - The source of the XML Schema to use.
      allowDtd - Whether external DTDs and entities can be accessed or not.
      allowInclude - Whether includes are resolved or not.
      resourceResolver - The custom resource resolver or null.
      Throws:
      SAXException - if an error arises while parsing the XML Schema.
    • XmlSchemaValidator

      public XmlSchemaValidator(Source schema) throws SAXException
      Constructor.
      Parameters:
      schema - The source of the XML Schema to use.
      Throws:
      SAXException - if an error arises while parsing the XML Schema.
    • XmlSchemaValidator

      public XmlSchemaValidator(byte[] schema) throws SAXException
      Constructor.
      Parameters:
      schema - The content of the XML Schema to use.
      Throws:
      SAXException - if an error arises while parsing the XML Schema.
    • XmlSchemaValidator

      public XmlSchemaValidator(File schema) throws SAXException
      Constructor.
      Parameters:
      schema - The XML Schema file to use.
      Throws:
      SAXException - if an error arises while parsing the XML Schema.
  • Method Details