Class XmlValidator

java.lang.Object
lt.viko.eif.jguscia.services.XmlValidator

public class XmlValidator extends Object
Service responsible for validating XML documents against an XSD schema. Ensures that the XML structure matches the rules defined in data.xsd.
  • Constructor Details

    • XmlValidator

      public XmlValidator()
  • Method Details

    • validate

      public void validate(String xml) throws Exception
      Validates the provided XML string using the XSD schema located in application resources.
      Parameters:
      xml - XML content to validate
      Throws:
      IllegalArgumentException - if the XML input is null or blank
      IllegalStateException - if the schema file cannot be found
      Exception - if the XML does not conform to the schema or validation fails