Validating xml schema

Rated 3.83/5 based on 989 customer reviews

Let’s walk through how to use All Validator in a Mule application.In this example, we are receiving the XML file through file connector, which will be validated against an XSD schema file defined in the application.

Syntax: The "standard" way of Validating XML schema in Mule is by using the schema-validation-filter and especially in combination with the message-filter.This tells XMLBlueprint to validate the XML Document against Schematron Schema "book.sch".In this case, the Schematron Schema is to be found in the same folder as the XML Document.In order to allow a valid XML to pass the filter, you need to set the return Result to false in your schema-validation-filter.This way, the payload of the message that is passed onwards to the next element in your flow will retain the XML content.

Leave a Reply