| This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Integration 6.5.3! | 
XML Validating Filter
The XML Validating Filter lets you validate incoming messages against provided schema instances. The following schema types are supported:
- 
xml-schema (www.w3.org/2001/XMLSchema) 
- 
relax-ng (relaxng.org) 
Messages that fail validation can either be silently dropped or be forwarded to a definable discard-channel.
Furthermore, you can configure this filter to throw an Exception in case validation fails.
The following listing shows all the available configuration parameters:
<int-xml:validating-filter discard-channel=""                    (1)
                           id=""                                 (2)
                           input-channel=""                      (3)
                           output-channel=""                     (4)
                           schema-location=""                    (5)
                           schema-type="xml-schema"              (6)
                           throw-exception-on-rejection="false"  (7)
                           xml-converter=""                      (8)
                           xml-validator="">                     (9)
    <int:poller .../>                                            (10)
</int-xml:validating-filter>| 1 | Message channel where you want rejected messages to be sent. Optional. | 
| 2 | ID for the underlying bean definition. Optional. | 
| 3 | The receiving message channel of this endpoint. Optional. | 
| 4 | Message channel where you want accepted messages to be sent. Optional. | 
| 5 | Sets the location of the schema to validate the message’s payload against.
Internally uses the org.springframework.core.io.Resourceinterface.
You can set this attribute or thexml-validatorattribute but not both.
Optional. | 
| 6 | Sets the schema type.
Can be either xml-schemaorrelax-ng.
Optional.
If not set, it defaults toxml-schema, which internally translates toorg.springframework.xml.validation.XmlValidatorFactory#SCHEMA_W3C_XML. | 
| 7 | If true, aMessageRejectedExceptionis thrown if validation fails for the provided Message’s payload.
Defaults tofalseif not set.
Optional. | 
| 8 | Reference to a custom org.springframework.integration.xml.XmlPayloadConverterstrategy.
Optional. | 
| 9 | Reference to a custom sorg.springframework.xml.validation.XmlValidatorstrategy.
You can set this attribute or theschema-locationattribute but not both.
Optional. | 
| 10 | A poller to use with the XPath filter. Optional. |