This advanced validation workflow component, Validate XML against XSD, can validate XML according to rules.
This component can validate an XML file against an schema definition (XSD). This component takes XML as input.
The component throws an exception if the validation fails. This exception can e.g. trigger an error workflow.
The component has this parameter:
The XSD to validate against is selected as an attribute. The XSD can loaded in the "transform" folder in the library. An XSD file in the library is allowed to include other XSD files that are also in the library, using relative paths (just like in a normal file system).
A sample XSD can e.g. be created from an XML file with this free online tool:
https://www.freeformatter.com/xsd-generator.html#ad-output
Here is an example of how the validation can be setup:
On the header of Read from file you can e.g. refer to an on error workflow or insert an error handler prior to the validation.
The validation itself refers to the uploaded xsd file in the library transform folder:
The subtree to the right of the validation will only be executed, if the validation does not fail.