Search code examples
xmlspring-integrationwell-formed

Spring Integration : How to check whether the input xml is well-formed


I am using Spring Integration and was wondering how can I check whether the incoming xml request is well formed or not? I am using with schema , but I don't think it will check for well-formed xml.

Any ideas?

Martin.


Solution

  • Let us know that <int-xml:validating-filter> doesn't fit your requirements:

    <int-xml:validating-filter id="filterA" 
                               schema-type="${xmlSchema}"
                               input-channel="inputChannelA"
                               output-channel="validOutputChannel"
                               discard-channel="invalidOutputChannel"
                               schema-location="org/springframework/integration/xml/config/validationTestsSchema.xsd"/>
    

    http://docs.spring.io/spring-integration/docs/latest-ga/reference/html/xml.html#xml-validating-filter