February 2015
Intermediate to advanced
198 pages
4h 17m
English
While we are discussing XML transformation, it's relevant to bring up the validation aspect of the XML payload. Prevalidation of XML will save the system from going in an erroneous condition and can act at the source. Spring Integration provides support for XML validation via a filter:
<int-xml:validating-filter id="feedXMLValidator" input-channel="feedsReadChannel" output-channel="feedsWriteChannel" discard-channel="invalidFeedReads" schema-location="classpath:xsd/feeds.xsd" />
The schema-location element defines the XSD that should be used for validation. This is optional and if it has not done so, set it to default xml-schema, which internally translates to org.springframework.xml.validation.XmlValidatorFactory#SCHEMA_W3C_XML ...
Read now
Unlock full access